Skip to content

Instantly share code, notes, and snippets.

@ringods
Created December 14, 2014 20:09
Show Gist options
  • Save ringods/5c16e342596606f796ce to your computer and use it in GitHub Desktop.
Save ringods/5c16e342596606f796ce to your computer and use it in GitHub Desktop.
Snapshots of EBS Volumes
$ ec2-create-volume –snapshot snap-cb7493a2 -z us-east-1a
VOLUME vol-9f00e5f6 1 snap-cb7493a2 us-east-1a creating 2008-09-26T11:52:37+0000
$ ec2-attach-volume vol-9f00e5f6 -i i-0fcf6c66 -d /dev/sdh
ATTACHMENT vol-9f00e5f6 i-0fcf6c66 /dev/sdh attaching 2008-09-26T12:01:15+0000
$ ec2-describe-volumes
VOLUME vol-9f00e5f6 1 snap-cb7493a2 us-east-1a in-use 2008-09-26T11:52:37+0000
ATTACHMENT vol-9f00e5f6 i-0fcf6c66 /dev/sdh attached 2008-09-26T12:01:15+0000
VOLUME vol-4001e429 1 us-east-1c available 2008-09-25T09:51:48+0000
$ ec2-create-snapshot vol-4001e429
SNAPSHOT snap-cb7493a2 vol-4001e429 pending 2008-09-26T11:48:30+0000
$ ec2-describe-instances
RESERVATION r-ff4d9e96 190912652296 default
INSTANCE i-0fcf6c66 ami-0757b26e ec2-67-202-35-79.compute-1.amazonaws.com domU-12-31-38-00-6C-F6.compute-1.internal running gettingstarted-keypair 0 m1.small 2008-09-26T11:55:16+0000 us-east-1a aki-a71cf9ce ari-a51cf9cc
$ ec2-describe-snapshots snap-cb7493a2
SNAPSHOT snap-cb7493a2 vol-4001e429 completed 2008-09-26T11:48:30+0000 100%
$ ec2-describe-volumes
VOLUME vol-9f00e5f6 1 snap-cb7493a2 us-east-1a available 2008-09-26T11:52:37+0000
VOLUME vol-4001e429 1 us-east-1c available 2008-09-25T09:51:48+0000
$ ec2-describe-volumes
VOLUME vol-4001e429 1 us-east-1c available 2008-09-25T09:51:48+0000
$ ec2-run-instances ami-0757b26e -k gettingstarted-keypair -z us-east-1a
root@domU-12-31-38-00-6C-F6:~# mkdir /mnt/my-volume
root@domU-12-31-38-00-6C-F6:~# mount /dev/sdh /mnt/my-volume
$ ssh -i id_rsa-gettingstarted-keypair root@ec2-67-202-35-79.compute-1.amazonaws.com
The authenticity of host ‘ec2-67-202-35-79.compute-1.amazonaws.com (67.202.35.79)’ can’t be established.
RSA key fingerprint is ab:df:4e:78:b7:4d:59:3e:ae:6c:81:32:80:eb:bd:78.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added ‘ec2-67-202-35-79.compute-1.amazonaws.com,67.202.35.79′ (RSA) to the list of known hosts.
Linux domU-12-31-38-00-6C-F6 2.6.21.7-2.fc8xen #1 SMP Fri Feb 15 12:39:36 EST 2008 i686
The programs included with the Ubuntu system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.
Ubuntu comes with ABSOLUTELY NO WARRANTY, to the extent permitted by
applicable law.
Amazon EC2 Ubuntu 7.10 gutsy base install AMI built by
Eric Hammond
For more information: http://ec2gutsy-desktop.notlong.com
root@domU-12-31-38-00-6C-F6:~# user-setup
Shadow passwords are now on.
Using `/usr/share/libgksu/debian/gconf-defaults.libgksu-sudo’ to provide `libgksu-gconf-defaults’.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment