Backup and restore
Open a support ticket to get assistance from Anaconda if you are upgrading your operating system or plan on migrating your instance of Package Security Manager to a new operating system architecture, as this could severely impact your Package Security Manager instance!
Prerequisites
-
pg_dump version 9.6.4+
-
pg_restore version 9.6.4+
-
Linux’s open file maximum must be set to 300,000
Backing up Package Security Manager
Follow these steps to back up your instance of Package Security Manager:
-
Open a terminal and connect to your instance of Package Security Manager. Work with your IT administrator if you need help with this step.
-
Enter your installer directory.
-
Using your preferred file editor, open the
docker-compose.yml
file. -
Locate the
Postgres: expose:
section of the file. -
Replace
expose
withports
, and replace"5432"
with"5432:5432"
. -
Save your work and close the file.
-
Restart your containers by running the following command:
-
Create a backup of the
docker-compose.yml
and.env
files. These files contain your server’s custom configurations and are overwritten during reinstallation. -
Run the following command from the install directory:
You can find your postgres password here:
<BASE_INSTALL_DIR>/config/postgres/postgres_db_password.txt
. By default, the<BASE_INSTALL_DIR>
is/opt/anaconda/repo
. -
Save the
repo.backup.zip
file to a secure location. -
Open your
docker-compose.yml
file. -
Revert the changes to the
Postgres: expose:
section of the file and restore your server’s custom configurations. -
Save your changes and close the file.
-
Open the
.env
file and restore your server’s saved custom configurations. -
Save your changes and close the file.
-
Restart your containers by running the following command:
Restoring Package Security Manager
Follow these steps to restore your instance of Package Security Manager:
-
Open a terminal and connect to your instance of Package Security Manager. Get help from your IT administrator if you need help with this step.
-
Enter your installer directory.
-
Using your preferred file editor, open the
docker-compose.yml
file. -
Locate the
Postgres: expose:
section of the file. -
Replace
expose
withports
, and replace"5432"
with"5432:5432"
. -
Save your work and close the file.
-
Restart your containers by running the following command:
-
Copy the
repo.backup.zip
file. -
Run the following command from the install directory:
You can find your postgres password here:
<BASE_INSTALL_DIR>/config/postgres/postgres_db_password.txt
. By default, the<BASE_INSTALL_DIR>
is/opt/anaconda/repo
. -
Open your
docker-compose.yml
file. -
Revert the changes to the
postgres: expose:
section of the file and restore your server’s custom configurations. -
Save your changes and close the file.
-
Open the
.env
file and restore your server’s custom configurations. -
Save your changes and close the file.
-
Run the following in the install directory:
Was this page helpful?