Backing up
For the backup, there are just two bash scripts but they requirejq 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
- Install the package
ae5_backup_restorefrom anaconda.org as shown below:
- 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:- Download and run the ae5_backup_restore installer.
- If you already have miniconda installed, you can just install in an environment as follows. This will install the backup/restore scripts and the
jqpackage in a conda environment:
- Proceed to Verify the installation below.
Verify the installation
Get usage help by running the following:Run the backup script
The following will create them_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:
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.- Stop the DB. Rename the working
/opt/anaconda/storagefolder so the data remains intact. Create new/opt/anaconda/storagefolder (ensuring permissions / owner are the same as the backup). Scale the DB back up and restart all application pods (anaconda-enterprise-ap):
- Once all the pods are back up, log in using default
anaconda-enterpriseuser. Since your LDAP configs are all in the/opt/anaconda/storage.workinglocation, LDAP login will not work. A new/opt/anaconda/storageis created that doesn’t contain any of your data/customizations. - Now let’s restore your config/DB as well as the data.
ae_restore.shusessudowhile copying the data back; ideally passwordless sudo should be setup for the account. - Continuing from the backup example, restore config/DB as well as the data:
- Wait for all pods to be in running state before testing. The
ap-ui,ap-repository,ap-authpods 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.
- Restore the
anaconda-repositoryof conda packages from the backup created above:
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.