Backup via CLI Script
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:
Using the SSH key that was selected when procuring the instance, SSH into the EJBCA Cloud instance using the username ec2-user:
CODE# ssh –i ssh-key.pem ec2-user@elastic-ip.compute-1.amazonaws.com
- Run the command
sudo su
to get elevated privileges:CODE# sudo su
- Change to the
/opt/PrimeKey/support
directory. - Run the script
system_backup.sh
to create a backup of your system. - Press Y to proceed and enter a password to protect the backup once prompted:
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:
"/opt/PrimeKey/support/backup_files/ejbca_db-ip-172-16-0-128.ec2.internal-1509663778.tar.gz
"
is copied to/home/ec2-user/
:CODE# cp /opt/PrimeKey/support/backup_files/ejbca_db-ip-172-16-0-128.ec2.internal-1509663778.tar.gz /home/ec2-user/
It is recommended to copy this backup to another system, either locally from the administration workstation, or in another AWS data center. For more information on how to copy the file from the EJBCA Cloud instance, see the Copying Backup Files to Other Systems section.
NOTE For instructions on how to automate the backup of the system in order not to prompt for passwords, see the Automating Backup Script section.