Skip to main content
Version: 24.3

Backing Up and Restoring Agility Connect

This topic explains how and when to use the Backup and Restore feature of Agility Connect.

Overview

This article describes the process of backing up the data, storing it off-server, and restoring it on an as needed basis.

Agility Connect consists of two areas that should be backed up on a regular basis: MongoDB database and a configuration directory on the file system.

Backup

The backup process requires access to the Agility Connect server. The following commands can be used or customized for use to create a backup tar file.

save the date in a variable

export THISDATE=\$(date +%Y-%m-%d\_%H-%M)  

create a temporary directory

mkdir /tmp/continuum_backup\_\${THISDATE}  
cd /tmp

create a dump of the continuum mongo db

mongodump --db continuum --out continuum_backup\_\${THISDATE}/continuum_mongo  

cp /etc/continuum/continuum.yaml continuum_backup\_\${THISDATE}/continuum.yaml
cp /etc/continuum/service.conf continuum_backup\_\${THISDATE}/service.conf

tar and gzip all the directories and files

tar -czf continuum_backup\_\${THISDATE}.tar.gz continuum_backup\_\${THISDATE}  

remove the directory

rm -rf continuum_backup\_\${THISDATE}

At this point you will want to get the file off the Agility Connect server using sftp or scp or some other means such as uploading to object storage like Amazon S3. Then remove the file from the Agility Connectdisk using the following command:

rm continuum_backup\_\${THISDATE}.tar.gz

This backup process can be used in a bash script and placed into a cron job or can be run from a scheduled Agility Connect Task. It is important to understand what an acceptable risk may be with regards to how often you run the backup: once a day, once an hour, and so on.

This backup process is in it's simplest form, there may be better options as far as performing snapshots or specific third party database backup technologies that your enterprise be already have at your disposal or may want to explore.

Offsite Storage

Digital.ai Agility does not provide any specific guidance on which method of offsite storage is used, whether that is a cloud-based object storage (Example:. Amazon S3), an ftp server or otherwise. We do recommend that you keep several interactions of backups and test your restore process.

Restoring a Backup

Make sure you have the same version of MongoDB on the server from which you took the backup and the server where you restore the backup. If not, upgrade the MongoDBbefore you restore the backup.

After choosing the backup version to restore, get the tar.gz file downloaded to the Agility Connect server. If you are recovering from a total and complete failure, you will need to first perform a new install on a new machine. Once the install has completed and the backup file is on the server, perform the following commands.

The first command sets the THISDATE environment variable to the date / time string part of the backup file name as a matter of convenience in the following commands.

\export THISDATE=2016-01-29_04-13  

stop the Continuum services

ctm-stop-services  

untar the file

tar -xzf continuum_backup\_\${THISDATE}.tar.gz  

restore the mongodb

mongorestore --drop --db continuum continuum_backup\_\${THISDATE}/continuum_mongo/continuum  

restore the config files

cp continuum_backup\_\${THISDATE}/continuum.yaml /etc/continuum/continuum.yaml  
cp continuum_backup\_\${THISDATE}/service.conf /etc/continuum/service.conf

start the services

ctm-start-services

Log in and check your data.