Having backups is very important and you should make sure they are enabled and tested before anyone starts using the ftrack server. It is recommended to have one backup per hour for the database and one backup per day for files.
You are responsible for having backups. If you do not have backups, there will be no way to restore your system if an issue occurs.
The following examples use a logical backup method for MariaDB called mysqldump. Using mysqldump is very flexible, but becomes slow when the database grows. Restoring from a dump is also slow and can take several hours for large datasets. How long time it takes to restore a backup depends on several factors such as server specification and disk performance. It is impossible to give any exact numbers on how long it can take to restore from a backup, and we therefore recommend that you restore your database to a staging server regularly. Both to test how long time it takes, but also verifying that the backups are working properly.
If downtime is a concern for you when upgrading to new server versions, or if an emergency happens we recommend that you look at using a physical backup methods instead. You can read more about different backup methods at the MariaDB website https://mariadb.com/kb/en/mariadb/backup-and-restore-overview/
Backup the database
mysqldump -u root -p$YOUR_DATABASE_PASSWORD ftrack > "ftrack_database_$(date +%Y_%m_%d_%H%M).sql"
Restore the database
mysql --user=root --password=$YOUR_DATABASE_PASSWORD -e 'drop database ftrack'
mysql --user=root --password=$YOUR_DATABASE_PASSWORD -e 'create database ftrack'
mysql --user=root --password=$YOUR_DATABASE_PASSWORD ftrack < $YOUR_DATABASE_BACKUP_FILE
tar -cf "ftrack_files_$(date +%Y_%m_%d_%H%M).tar" /opt/ftrack_config/data/attachments
Files such as thumbnails and uploaded attachments are stored in
/opt/ftrack_config/data/attachments. Restore them from a backup like this:
rm -rf /opt/ftrack_config/data/attachments/*
tar -xf $YOUR_FILES_BACKUP_FILE --dir /
Then, restore the ownership and permissions on the directory after extracting the files.
Restore file permissions
To restore the file permission of the config directory, run the following as root:
chown -R ftrack:ftrack /opt/ftrack_config
chmod -R a+rwX /opt/ftrack_config