If you are using PANDA in production you will want to ensure that you perform frequent backups. For archival purposes the most crucial thing to store is the data files themselves, however, you will probably also want to backup your search indexes and database.
If you are hosting your PANDA on Amazon EC2 then you can make use of EC2’s “snapshot” ability for your backups. In essence a snapshot is an exact copy of any EBS volume. You can use this ability to create backups your PANDA server and, if you have migrated your files and indexes, the volumes they reside on as well. We provide a script to automate this process. You will need to have at least some experience with administering a server in order to use this script.
To perform a one-time backup SSH into your server and execute the following commands:
cd /opt/panda/scripts
sudo python backup_volumes.py
When asked for your Amazon Access and Secret keys you can paste them into the console. They will not be displayed or logged. Your PANDA will be unavailable during the backup process, which may take some time (especially if your volumes are large).
Once the script has completed your backup will be created and your PANDA will be running again.
Restoring a backup created with snapshots is a matter of restoring each volume and ensuring they are mounted correctly. However, because one of the volumes that will need to be restored is the root volume of the instance, we have to do a little magic. To restore the root volume:
If you have run either the files or indexes storage migration scripts then you will also need to restore your additional storage volumes. These are more straight-forward:
Once all volumes have been created and attached, navigate back to the Instances tab, find your instance in the list, right-click it and select “Start”. Once it is finished booting up you will have successfully restored your PANDA backup!
If you chose to self-install PANDA your backup options may vary widely. If possible you should consider periodically disabling the PANDA services and backing up the entire filesystem. If you have files and indexes stored on separate devices you will, of course, want to back those up as well. Using compressed and/or incremental backups will likely save you a significant amount of storage space.