Backup via CLI Script

To backup an instance of EJBCA Cloud on Azure, you can either use the CLI script included on the instance or create a snapshot in the Azure Portal. 

The following describes how to backup using a script. For information on using the Azure Portal with snapshots, see Backup using Azure Snapshot.

Backup via Script

To backup the instance using the script included on the instance:

  1. If you selected ssh key access when procuring your instance, use the SSH key that you selected when procuring the instance. If you chose username and password, use the combination you chose at launch time to SSH into the EJBCA Cloud instance. For example, for azure-user with an IP address of 40.118.253.3 use the following:

    # ssh azure-user@40.118.253.3

  2. Run the command sudo su to get elevated privileges:

    # sudo su
  3. Change to the /opt/PrimeKey/support directory.
  4. Run the script system_backup.sh to create a backup of your system.
  5. Press Y to proceed and enter a password to protect the backup once prompted:


  6. Make a note of the name of the backup file created. Copy the backup file to a directory that is accessible by the azure-user, for example /home/azure-user/.
    In this case, the file named:
    "/opt/PrimeKey/support/backup_files/ejbca_db-40.118.253.3-1556223266.tar.gz"
    is copied to /home/azure-user/:

    # cp backup_files/ejbca_db-40.118.253.3-1556223266.tar.gz /home/azure-user/