When running ftrack on-prem, you must have a solid understanding of where your data lives. In ftrack, there are two types of data: the database and the uploaded files. You must back up both types of data.
These backups are crucial in the event of any serious errors or setbacks. You should make sure backups are enabled and tested before anyone begins using your ftrack server. We recommend making one backup per hour for the database and one backup per day for files.
As the account owner, you are responsible for enabling and running backups. If you do not set up backups, there will be no way to restore your system following an incident.
The following database backup examples use a logical backup method for MariaDB called mysqldump. Using mysqldump is very flexible, but becomes slow as your database grows. Restoring from a dump can also be time-consuming and may take several hours for large datasets. The amount of 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.
We therefore strongly recommend that you restore your database to a staging server regularly. Doing so allows you to test how long the process will take, while also verifying that the backups are working correctly.
If downtime is a concern for you when upgrading to new server versions, or if an emergency occurs, we recommend that you look at using 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/
mysqldump -u root -p$YOUR_DATABASE_PASSWORD ftrack "ftrack_database_$(date +%Y_%m_%d_%H%M).sql"
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></$your_database_backup_file>
After restoring, use the ftrack upgrade command to ensure the database is upgraded to the same version as the server.
The way in which you backup files depends on the type of storage you are using. If you are able to access the storage as a disk drive, then files can be backed up using the following commands:
tar -cf "ftrack_files_$(date +%Y_%m_%d_%H%M).tar" /ftrack/data/attachments
rm -rf /ftrack/data/attachments/*
tar -xf $YOUR_FILES_BACKUP_FILE --dir /
chown -R 500:500 /ftrack/data
chmod -R a+rwX /ftrack/data
It is important to also restore file permissions after you have restored files.