# Firefish backup scripts ## Introduction: The bash files that create: * A backup of the Firefish default.yml config and Firefish user /files/ directory * A PostgreSQL backup of the WHOLE database * A zipped archive of the above ## Files: * ### [backup_firefish_db.sh] The script to create a binary backup of the PostgreSQL database. This needs .pgpass to be in place so that it can execute without a password prompt when using cron * ### [backup_firefish_files.sh] The script to create a backup of the default.yml config file and then the Firefish user /files/ directory that hold the 'Drive' files The script first removes the file to show that a previous backup was created The removed file is replaced when a new backup is successfully completed The [**restore_firefish.sh**] process will not run if this file is not in place * ### [backup_firefish_zipped.sh] The script to create an archive of the Firefish configs, the user files backup and the PostgreSQL database backup. The script then creates a file to show that a backup has successfully completed ## .pgpass Set up .pgpass to allow for postgres account authorisation without passing a password: sudo nano /home/$USER/.pgpass \#hostname:port:database:username:password \*:\*:\*:ThePostgresAccount:ThePostgresAccountPassword sudo chown $USER:$USER /home/$USER/.pgpass chmod 600 /home/$USER/.pgpass export PGPASSFILE='/home/$USER/.pgpass' Check the enviroment variable has been set using: env