Creating and storing OnApp database dumps
Included in the OnApp control panel (CP) server software is a tool which is used to create database dumps, each containing a copy of the table structure and the data that existed in the OnApp database at the time the dump was created.
The database dumps can later be used to recover the database contents in the event of data loss.
By default, the dump creation tool runs automatically once every hour and stores the database dumps locally, in the folder /onapp/backups/db/dump/
To manually create a dump of the OnApp database, an administrator can run the following command on the CP:
# sh /onapp/onapp-cp-install/onapp-database-dump.sh
To change the frequency or schedule for automatic dump creation, an administrator can alter the following line in the file /etc/crontab:
40 * * * * root sh /onapp/onapp-cp-install/onapp-database-dump.sh
So that the scheduled dumps are available in the event of the CP server’s local storage becoming corrupted or lost, it is a good idea to store them on a completely separate server. In an OnApp cloud, the dumps could be stored on a dedicated backup server or a standby CP.
To configure this:
1. Ensure that the onapp user’s RSA key is authorized on the target server by running the following on the CP:
# ssh-copy-id -i /home/onapp/.ssh/id_rsa.pub root@[target server IP address]
2. Add the target server’s IP address to the following line in the file /onapp/onapp-cp.conf :
I hope that’s helpful. For more information about the configurable options see https://docs.onapp.com/misc/onapp-database-backup