System Backup
A database backup is of no use unless you have a backup of the system encryption key. To retrieve the encryption key, see the section Encryption Key Backup. It will not be included in any of your backups.
Automated Backup
VirtFusion supports automated backups of its database using either local storage, SCP or a combination of both. You can find the settings in the admin area System -> System Backup
. All the options should be self explanatory.
Manual Backup
We know some people like to be in full control of their backups are prefer to offload backups using different methods. Below you will find a few examples on how to dump the database.
Dumping the Database
Simple dump:
mariadb-dump --skip-ssl --user=root `cat /opt/virtfusion/app/control/.env | grep 'DB_DATABASE' | cut -d'"' -f2` > /tmp/database.sql
Single transaction using gzip
compression:
mariadb-dump --skip-ssl --single-transaction --opt --user=root `cat /opt/virtfusion/app/control/.env | grep 'DB_DATABASE' | cut -d'"' -f2` | gzip > /tmp/database.gz
Encryption Key Backup
The system encryption key must be securely stored in a safe location. Without this key, certain parts of the database will be inaccessible and unusable. The encryption key is not included in backups.
To retrieve the encryption key, run the following command via SSH on the control server as a privileged user:
vfcli-ctrl app:retrieve-key