To backup an instance of EJBCA Cloud, you can either use the CLI script included on the instance or create a snapshot in the AWS Console. This section describes how to backup using a script. For information on using the AWS Console with snapshots, see Backup using AWS Snapshot.

Backup via Script

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

  1. Using the SSH key that was selected when procuring the instance, SSH into the EJBCA Cloud instance using the username ec2-user:

    # ssh –i ssh-key.pem

  2. Run the command sudo su to get elevated privileges:
    # sudo su
  3. Change to the /opt/PrimeKey/support directory.

  4. Run the script 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 ec2-user, for example /home/ec2-user/.

    In this case, the file named:
    is copied to /home/ec2-user/:

    # cp /opt/PrimeKey/support/backup_files/ejbca_db-ip-172-16-0-128.ec2.internal-1509663778.tar.gz /home/ec2-user/