NOTE: These procedures are only for use by customers self-hosting their PlexTrac instance
Performing a local backup will ensure that all date from the database container is extracted into the local file system. This is a recommended procedure prior to performing an update.
Navigate to the directory where the plextrac_backup_restore.sh script is located, normally /opt/plextrac
$ sudo ./plextrac_backup_restore.sh backup
This script places copies of all data into the /backups and /uploads directories.
A restore from local backup is only necessary if your existing database has been corrupted or lost. It is advised that you consult PlexTrac support to assist in troubleshooting the root cause before performing a restore.
Navigate to the directory where the plextrac_backup_restore.sh script is located, normally /opt/plextrac
$ sudo ./plextrac_backup_restore.sh restore
To move your data into a non-local location, you will first perform the local backup procedure described above. Next, archive the /backups and /uploads folders using the method of your choosing (e.g. tar.gz) and copy them to your desired off-machine destination.
$ tar -zvcf $(hostname)_$(date "+%Y-%m-%d")_backup.tar.gz backups/ uploads/
To restore from an off-machine archive, remove the existing local /backups and /uploads folders from the PlexTrac directory, normally /opt/plextrac.
Copy the archived versions of these folders into this directory and unarchive them.
Perform the Local Restore procedure described above.