Skip to content
Maikel edited this page Oct 9, 2015 · 12 revisions

Backups are also managed in S3. Do run through the file storage steps first, particularly the last bit about creating buckets specifically for the backups!

Database

Automatic database backups are managed with the db2fog gem using the Amazon S3 configuration entered in the Spree Admin Configuration page under Image Settings. If you want to run a backup manually, run the following on your server:

cd ~/apps/openfoodnetwork/current   # or where you installed the app
bundle exec rake db2fog:backup RAILS_ENV=production

You should see a backup file in your S3 bucket now.

Known errors

pg_dump: [archiver (db)] connection to database "openfoodnetwork" failed: fe_sendauth: no password supplied

Edit config/database.yml and make sure that a password is set for your environment. But it is more likely that you find the host set to 127.0.0.1, which looks fine. But it must be set to localhost to work for backups.

Files

Files should be [stored on S3](File storage) directly.