Backing up a Refinery Instance
Content:
Note:
To ensure a full back up of one's Refinery instance, one must ensure that the following items are saved/copied elsewhere.
- Local settings
- PostgreSQL database
- File store
Below are instructions on how to accomplish a complete backup.
Script:
For convenience we provide a backup script, which performs each step, creates a compressed archive and moves it into Refinery's synced directory. Follow the instructions below to backup your Refinery instance.
Note: If the enviornmental variable REFINERY_VM_TRANSFER_DIR
is set up and you work with the dev vm the final tarball is moved to this transfer directory. Edit BACKUP_FINAL
if you need to move the final tarball somewhere else.
$ vagrant ssh
$ workon refinery-platform
$ cd /vagrant
$ ./backup.sh
Note: The script does not take care of managing backup tarballs!
$ gzip -c < /vagrant/refinery/config/config.json > /vagrant/transfer/backup/settings/config.json.gz
According to: http://www.postgresql.org/docs/9.1/static/app-pgdump.html
$ pg_dump -Fc refinery > /vagrant/transfer/backup/postgresql/refinery.dump
$ rsync -azP /vagrant/media/file_store/ /vagrant/transfer/backup/file_store
Follow the instructions regarding the installation of Refinery first and make sure that you replace your backed up settings before provisioning the vm. Then restore the other data step by step.
If you created your backups using our backup script, you can easily restore a backup using our restore script. Follow the instructions below.
$ vagrant ssh
$ workon refinery-platform
$ cd /vagrant
$ ./restore.sh /vagrant/transfer/20000101.tar.gz
Notes:
- Do not rename the backup's tarball created by
backup.sh
, otherwiserestore.sh
will fail. - Make sure that all services are running properly; e.g. Solr.
$ gzip -d < /vagrant/transfer/config.json.gz > /vagrant/refinery/config/config.json
$ pg_restore -d refinery /vagrant/transfer/backup/postgresql/refinery.dump
$ rsync -azP /vagrant/transfer/backup/file_store/ /vagrant/media/file_store
As we are not backing up Solr's index, it needs to be rebuild after restoring the data. Feel free to adjust (or remove) --batch-size
depending on your server specs. Usually a batch size of 25 works fine even when developing locally.
Prerequisite:
- Make sure that the VM is running and that all services started. You can check the status of services using
supervisorctl status
.
$ ./manage.py update_index --batch-size 25
Administration
- Operations
- Setting Up Galaxy
- Galaxy CloudMan
- Annotating & Importing Refinery Tools
- Batch Import ISA-Tabs
- Backup & Restore
- Google reCAPTCHA v2
Development