Moving Backup Data
This page provides the steps to move backup data when migrating to another server.
A backup consists of two parts:
- 1.The database backup, which contains the information such as users and reports.
- 2.The “uploads” directory, which contains items that are uploaded (i.e. scans) and screenshots that may be used in a report.
Both are needed to make a complete backup and restore to a new server.
Step 1: List the files listed in the uploads directory.
ls -lah /opt/plextrac/backups/uploads

Step 2: Identify the most recently made directory. From a local machine, copy the directory off the server. For example:
scp [email protected]:/opt/plextrac/backups/uploads/{2022.03.23-08.00.01.tar.gz} {local file path}
Step 3: List the files in the couchbase directory.
ls -lah /opt/plextrac/backups/couchbase

Step 4: Find the latest backup and archive and zip the directory. For example:
tar -zvcf $(hostname)_$(date "+%Y-%m-%d")_backup.tar.gz /opt/plextrac/backups/couchbase/{dir}

When running the above command it will place the new tar.gz file in the directory from where you are running the command.
Step 5: Copy the new tar.gz file that was created from the server to a local machine. For example:
scp [email protected]:/opt/plextrac/{example.tar.gz} {local file path}
Step 6: Once the database and uploads directories have been successfully copied to a local machine, upload them to the new destination.
Last modified 1mo ago