Copying File to Local Workstation

Using either the command line interface (CLI) or a Secure Copy Protocol (SCP) utility, copy the file to your local system. You can copy the file directly from one instance to another if your VPC allows it. In this example, we will bring the file down locally and then SCP it to the new instance.

  1. Using the CLI:
    # scp -i ~/Documents/C2\ Comp/PrimeKey/EC2\ Creds/c2-ssh/c2-ssh.pem ec2-user@ec2-34-229-187-81.compute-1.amazonaws.com:/home/ec2-user/signserver_db-ip-172-16-0-128.ec2.internal-1509663778.tar.gz ~/Downloads/signserver_db-ip-172-16-0-128.ec2.internal-1509663778.tar.gz
    CODE
  2. Using a SCP utility (in this case Cyberduck):
    1. Specify details to connect to your instance, for example hostname, username, and SSH key:
    2. Connect to the instance and download the file to the local system:
    3. Wait for the download to complete.

Copy Backup File to Another Instance

  1. SCP the backup file to another instance using the following CLI command:
    # scp -i ~/Documents/C2\ Comp/PrimeKey/EC2\ Creds/c2-ssh/c2-ssh.pem ~/Downloads/signserver_db-ip-172-16-0-128.ec2.internal-1509663778.tar.gz ec2-user@ec2-52-23-217-245.compute-1.amazonaws.com:/home/ec2-user/
    CODE


  2. Once the backup file is copied, SSH into the new host and verify that the file was copied correctly.