Restoring Procedures

This page explains how to restore the database in PlexTrac.
This should only be used when absolutely necessary due to risk in data loss.


  • Access to command-line where PlexTrac is hosted
  • Recent backup performed using the PlexTrac Utility
  • Possession of Couchbase, Postgres and uploads in tar.gz format (See instructions here on how to perform a backup and prepare it to be moved to a new host)

Restoring Process

Step 1: For the most consistent results, create a new directory in /opt/plextrac and move any content from /opt/plextrac/backups/couchbase/, /opt/plextrac/backups/postgres/, and /opt/plextrac/backups/uploads/ to this new directory.
If you do not see the directories listed above, the plextrac backup command has likely not been run yet. Once this command is executed, the directories will be created.
Step 2: Place only the desired {{uploads}}.tar.gz to restore into the following directory: /opt/plextrac/backups/uploads.
Step 3: Place only the desired {{couchbase}}.tar.gz in the /opt/plextrac/backups/couchbase.
Step 4: Place only the desired {{postgres}}.tar.gz in the /opt/plextrac/backups/postgres.
During Steps 2-4, verify when placing the files in the given directories that only these files exist. The existence of other files or directories may lead to errors during the restore process.
Step 5: In the /opt/plextrac/backups/couchbase directory, unzip the {{database.tar.gz}}.
tar -xvf {{database.tar.gz}}
Step 6: Validate that the path to the extracted database directory follows this example: /opt/plextrac/backups/couchbase/2022-04-13T165909Z/2022-04-13T165909Z-full.
The restore script is looking for this particular file structure. If you try running a restore, while the path to the database backup looks something like this (two backup directories exist in the path) /opt/plextrac/backups/couchbase/backups/2022-04-13T165909Z/2022-04-13T165909Z-full, the following error will occur when trying to restore:
Step 7: Run plextrac restore. Depending on the size of the database and uploads directories, it might take several minutes to complete.
plextrac restore -v
Step 8: Enter yes or no to proceed with the restore of Postgres, then enter yes or no to restore Couchbase, and finally enter yes or no to restore the uploads.
Step 9: Once both sections have successfully completed, navigate to the platform and check that the data has been restored.
© 2022 PlexTrac, Inc. All rights reserved.