Skip to main content
You may choose to back up AE regularly, based on your organization’s disaster recovery policies.
You can start the backup process while users are working; however, the backup process will not capture any open sessions or deployments. We therefore recommend that you ask all users to save their work, stop any sessions and deployments, and log out of the platform during the upgrade window if they’d like that content backed up.
This topic provides guidance on the following actions:

Backing up

For the backup, there are just two bash scripts but they require jq so you would have to do a conda install so you get the dependencies. Anaconda recommends installing miniconda under /opt/anaconda to allow all AE admins to access it. This is helpful in case admins change. Next, follow the steps in the section below if AE-master has internet access, or follow the steps under AE-master is airgapped if it’s airgapped.

AE-master has internet access

  1. Install the package ae5_backup_restore from anaconda.org as shown below:
  1. Proceed to Verify the installation below.

AE-master is airgapped

If you are air gapped, follow the below steps to download the installer and install:
  1. Download and run the ae5_backup_restore installer.
  2. If you already have miniconda installed, you can just install in an environment as follows. This will install the backup/restore scripts and the jq package in a conda environment:
  1. Proceed to Verify the installation below.

Verify the installation

Get usage help by running the following:
Next, run the backup script.

Run the backup script

The following will create the m_backup directory if it does not already exist. Ensure you have sudo access before running, as the script needs it to copy files from /opt/anaconda/storage:
The output will look like the following:
Conda packages are not included in the backup. It is your responsibility to make a backup. These are stored in /opt/anaconda/storage/object/anaconda-repository.

Restore data from backup

If you backed up your Anaconda Enterprise installation, you can follow the steps below to restore the installation along with your config/DB.
This will delete user sessions from the database (DB).
  1. Stop the DB. Rename the working /opt/anaconda/storage folder so the data remains intact. Create new /opt/anaconda/storage folder (ensuring permissions / owner are the same as the backup). Scale the DB back up and restart all application pods (anaconda-enterprise-ap):
  1. Once all the pods are back up, log in using default anaconda-enterprise user. Since your LDAP configs are all in the /opt/anaconda/storage.working location, LDAP login will not work. A new /opt/anaconda/storage is created that doesn’t contain any of your data/customizations.
  2. Now let’s restore your config/DB as well as the data. ae_restore.sh uses sudo while copying the data back; ideally passwordless sudo should be setup for the account.
  3. Continuing from the backup example, restore config/DB as well as the data:
  1. Wait for all pods to be in running state before testing. The ap-ui, ap-repository, ap-auth pods take some time to come back up.
If the data file is not provided, then the DB is not restored; only the secrets/configmaps are restored.
  1. Restore the anaconda-repository of conda packages from the backup created above:
This version cleans out old sessions from the DB; but it doesn’t clean out deployments. You might need to manually terminate deployments since there will be no user sessions or deployments in the real backup/restore scenario.
The psql errors like ERROR:  database "anaconda_auth" does not exist are an artifact of the testing. They result from moving the existing pgdata directory, and then letting it get recreated by scaling the DB pod; the tables do not exist in the way they would when you (re)install then restore. This error can be ignored.