Backing up and restoring Private Cloud

Each Private Cloud instance comes with the service scripts which you can use to easily create a new backup or restore all data from an existing backup and then apply it to the freshly installed instance.

This can be useful in many cases, such as:

By backing up the Private Cloud instance, you preserve the configuration of your instance, keep service data and user accounts in safety, retain information about your model runs — and the models themselves.

Backup structure

Backup scripts work with the following Cloud service components:

Component Contents Backup mechanism
fileserver
(based on MinIO)
Model files — JARs and attached files
Static assets of the Private Cloud web UI
Service files (such as Java policies)
The fileserver component is backed up by creating a copy of the MinIO anylogic-cloud bucket.
By default, you can view the contents of this bucket in the cache/fileserver directory on the server machine running the fileserver Docker container.
cassandra
(Cassandra database management system)
Model run results
Run configurations
The state of Cassandra is preserved in a snapshot. Snapshots are created using built-in Cassandra functionality.
The resulting snapshot is copied by executing a particular Docker command (depending on your version of Private Cloud).
postgres
(PostgreSQL database)
User accounts
Experiment data
Database records about models
Model version data
Other Cloud metadata
The database is backed up by the pgdump tool.
The resulting backup is an SQL file that is copied to the location of the backup image.

Each Private Cloud backup is a directory containing the following sub-directories:

Known restrictions

Important: All commands listed below should be executed in your Linux terminal.
Before proceeding with any of the described scenarios, open the terminal and navigate to the folder containing the unzipped installation package of Private Cloud.
To learn how to install Private Cloud and where to retrieve the installation package, see Installing Private Cloud.

 To create a backup of the instance in Private Cloud 2.1.2 and newer versions

  1. Execute the backup script:
    sudo tools/backup.sh
  2. Supply a path to the directory that will contain the future backup.

Consider launching the script while passing the path to the backup directory as an argument, for example:
sudo tools/backup.sh /path/to/backup

Additionally, you may want to ensure compatibility with an older version of the Private Cloud backup tool. In this case, the path should be passed as the value of the backup_dir option:
sudo tools/backup.sh backup_dir=/path/to/backup

 To create a backup of the instance in versions older than Private Cloud 2.1.2

In older versions of Private Cloud, the backup utility is an Ansible playbook.

  1. Execute the backup script:
    sudo ansible-playbook tools/backup.yml
  2. Supply a path to the directory that will contain the future backup.

To specify the backup directory as an argument, you need to pass it as the value of the backup_dir option, for example:
sudo ansible-playbook -e backup_dir=/path/to/backup tools/backup.yml

 To restore an instance from a backup image in Private Cloud 2.1.2 and newer versions

  1. Execute the restore script:
    sudo tools/restore.sh
  2. Supply a path to the directory containing the backup image.

Consider launching the script while passing the path to the image as an argument, for example:
sudo tools/restore.sh /path/to/backup

Additionally, you may want to ensure compatibility with an older version of the Private Cloud restore tool. In this case, the path should be passed as the value of the backup_dir option:
sudo tools/restore.sh backup_dir=/path/to/backup

 To restore the instance from a backup image in versions older than Private Cloud 2.1.2

In older versions of Private Cloud, the restore utility is an Ansible playbook.

  1. Execute the restore script:
    sudo ansible-playbook tools/backup.yml
  2. Supply a path to the directory containing the backup image.

To specify the directory containing the backup image as an argument, you need to pass it as the value of the backup_dir option, for example:
sudo ansible-playbook -e backup_dir=/path/to/backup tools/backup.yml


Related topics

How-to video: AnyLogic Cloud

Tutorial: Exporting a model to AnyLogic Cloud

AnyLogic Cloud options