logoBack to home screen

Using Backup and Restore Scripts

ADx and Conversion packages contain the create-backup.sh and restore-backup.sh scripts. As a best practice, we recommend to use those scripts to back up your current installation before installing a new version. In case of errors in the new version, you can quickly restore the working runtime from a backup package. Update procedure is the same for ADx and Conversion.

Note that these scripts only back up ADx/Conversion installation and NOT the whole system (which relies on external components, such as databases, file systems or cloud storage at your organization). To back up the whole system you need to follow your organization guidelines for backing up the external components, in addition to backing up ADx/Conversion installation.

What's Backed Up?

All files in the installation root. These include existing ADx/Conversion runtime and its configuration, as defined in the installation settings file at the time when ADx/Conversion was installed:

  • Installation license
  • Default admin user
  • Tribefire-services URL
  • Database connection settings (but NOT the database data!)
  • File system paths used (but NOT the file system data itself!)
  • Default repository settings - if they were used
  • Runtime properties

Essentially, the entire ADx or Conversion installation directory that you enter in create-backup.sh is backed-up as a .zip package.

What's NOT Backed Up?

The backup script creates a backup of a single installation folder. Therefore, the backup does NOT include:

  • Any database data, i.e. neither system nor business data!
  • Any files shared between the cluster nodes, such as business files (documents, images) and Elasticsearch data!
  • Any other files which are not part of the installation root. This depends on the installation settings, but log files and temporary files are not included by default.

If you changed the installation settings when previously installing ADx/Conversion so that any of the files mentioned above are written to the installation folder, they will also be backed up. This is not a recommended practice though and it will cause backups to be larger and slower.

Backing-up Existing ADx/Conversion Installation

Our backup script creates a .zip package from a valid ADx/Conversion installation directory.

  1. Open the deployment package. The following files should be available (for example when you list with ll):

    • README
    • check-health.sh
    • create-backup.sh
    • encrypt.sh
    • example-environment.sh
    • example-installation-settings.yaml
    • install.sh
    • jinni.sh
    • resources/
    • restore-backup.sh
  2. Run ./create-backup.sh --installationFolder [installation folder] --backupFolder [backup folder]. Assuming your installation folder is /opt/braintribe/adx/installation, and you want to create the back-up archive in /opt/braintribe/adx/backups, you need to execute the following command:

    ./crate-backup.sh --installationFolder /opt/braintribe/adx/installation --backupFolder /opt/braintribe/adx/backups

    You can also use aliases: -i for --installationFolder and -b for --backupFolder.

    As a result, a .zip archive with a timestamp (similar to adx-20200206-132812.zip) containing your installation files is now available in /opt/braintribe/adx/backups. The script allows creating multiple archives in the same folder.

    For command-line help, run ./create-backup.sh.

Restoring ADx/Conversion Installation

Restoring an installation essentially means un-zipping previously created backup package into a new directory. Restoring into an existing directory is NOT allowed to avoid possible data loss.

  1. Open the deployment package. restore-backup.sh should be available among other files.

  2. Run ./restore-backup.sh --backupArchive [backup archive] --installationFolder [installation folder]. Assuming your backup folder is /opt/braintribe/adx/backups, you want to restore from the adx-20200206-132812.zip archive, and you want to restore ADx in /opt/braintribe/adx/restored_installation, you need to execute the following command:

    ./restore-backup.sh --backupArchive /opt/braintribe/adx/backups/adx-20200206-132812.zip --installationFolder /opt/braintribe/adx/restored_installation

    You can also use aliases: -b for --backupArchive and -i for --installationFolder.

    As a result, ADx installation archive is unzipped into the target directory. You can now start the restored ADx runtime! To do so, open the restore directory, go to /runtime/host/bin and execute ./catalina run.

    For command-line help, run ./restore-backup.sh.