Skip to main content
Version: 4.2

System Backup

VERY IMPORTANT!

A database backup is of no use unless you have a backup of the system encryption key. Navigate to System -> System Backup and copy the Encryption Key. It will look similar to base64:6oQ0Z1Yz29gMAGrGEPFjHDGqEwW/Fj4vG8ATAZsqL9U=. Make sure you make a copy your key and store if somewhere safe. 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.

Finding the Database Name

Each control server install will have a unique database name. The name can be found by running the following command:

cat /opt/virtfusion/app/control/.env | grep 'DB_DATABASE' | cut -d'"' -f2

It should print out the database name. For example:

root@control:~# cat /opt/virtfusion/app/control/.env | grep 'DB_DATABASE' | cut -d'"' -f2
vf_d_zNVjA0mRuMnXgZ2xVEk8

Dumping the Database

Simple dump:

mysqldump --user=root DATABASE_NAME > /tmp/database.sql

Single transaction using gzip compression:

mysqldump --single-transaction --opt --user=root DATABASE_NAME | gzip > /tmp/database.gz