0

I have created some EBS backups over the years, but I can't remember if they were volume or instance backups. Is there some way to tell by looking at one or more field(s) in the list, e.g., at https://ap-southeast-1.console.aws.amazon.com/ec2/v2/home?region=ap-southeast-1#Snapshots:sort=desc:startTime, or in the detailed "description" when I click on one of the snapshots? (the detailed description looking as in the snapshot below, for example) Unfortunately, there isn't a field that says "EBS backup type" that takes a value of "instance" or "volume". As indicated in this stackoverflow question, for example, both types are stored as "EBS Snapshots", so as I understand it then, both will appear mixed together in the same list of EBS snapshots.

enter image description here

Most of the previous questions, e.g., this stackoverflow question, or other pages I've found from searching, have been about the differences between volume and instance backups, and how one might choose one or the other. However, I'm not asking about that, but just if there is any way I can tell what type my previous backups are. Or do I just have to tag the type myself or put it as part of the description string?

UPDATE

From looking at the VolumeID of the snapshot (vol-0565abe0e54ad4adf in the image, for example), I'm guessing that if an existing ec2 instance is using that volume, then that particular snapshot was an instance snapshot? But it could also have been a volume snapshot of that volume?

UPDATE 2

It appears there is some confusion regarding what I'm referring to (from the answers and comments posted so far). I'm not using DLM, but the EC2 console (see image below, and "Snapshot" is the place I navigate to.

ec2 console options

Then, when I click on "Create snapshot", I see the following, which shows the options of volume and instance (the first question). This may be a new option, as I don't remember seeing it before. choice of volume or instance

TylerH
  • 20,799
  • 66
  • 75
  • 101
auspicious99
  • 3,902
  • 1
  • 44
  • 58
  • There is no "instance snapshot", a snapshot can be used by an AMI, but the snapshot itself is always generated from volume. If you want to have a backup of your instance you need to generate an image, which will give you an AMI. – Azize Jan 03 '21 at 11:48
  • @Azize Please see the "Update 2", regarding DLM and "instance snapshot" – auspicious99 Jan 03 '21 at 13:45

3 Answers3

1

An EBS snapshot is a backup of a single EBS volume. The EBS snapshot contains all the data stored on the EBS volume at the time the EBS snapshot was created.

An AMI image is a backup of an entire EC2 instance. Associated with an AMI image are EBS snapshots. Those EBS snapshots are the backups of the individual EBS volumes attached to the EC2 instance at the time the AMI image was created.

To get Snapshots associated with still running Volumes, attempt to match their VolumeID with the VolumeID of still running Volumes. Output the SnapshotID of matches.

Asri Badlah
  • 1,949
  • 1
  • 9
  • 20
  • So in looking at the list of snapshots I have from previous years, I can't tell (by VolumeID or otherwise) which ones are instance snapshots and which are volume snapshots? – auspicious99 Jan 03 '21 at 10:35
  • you can get the still running volumes IDs and check if they have associated snapshots then the remaining snapshot are not used by any volume – Asri Badlah Jan 03 '21 at 10:42
0

A snapshot is performed on a single volume, these will always be a backup of the individual volume rather than th complete ec2 instance.

To restore this snapshot, you would restore it to create a new EBS volume that could then be attached to an EC2 instance.

If however your instance is running a single volume you can go one step further. Instead of launching as an EBS volume you can instead create an AMI from the snapshot. This AMI can then be used to launch further instances using the base image taking from the snapshot.

Chris Williams
  • 32,215
  • 4
  • 30
  • 68
  • When one goes to the ec2 console, and Elastic Block Store->Snapshots, then "Create Snapshot", there is a choice of instance or volume. But you're saying it will always snapshot a volume only? – auspicious99 Jan 03 '21 at 10:34
  • Selecting 'instance' is just a shortcut for seeing a list of volumes associated with the instance. The snapshot will still be of the volumes themselves. – John Rotenstein Jan 04 '21 at 03:36
0

I suspect you are using Data Lifecycle Manager (DLM), not exactly AWS Backup, because you are getting snapshots, AWS Backup work with vault, so you would not see snapshot.

If this is the case, DLM only work with volumes, so you only get backup of your volumes, not instances.

With AWS Backup you can have both, backup of your volumes and/or backup of your instances.
They will be contained inside a vault when backup happens, when necessary you will need to restore it from vault, which will gives you an AMI or a volumes, depending on which kind of backup you did.


Thanks for your update!

I got your point, the instance option there is just a helper to facilitate your life, imagine that you have an instance with 2 volumes and you want to create a snapshot of both volumes, in this case you could go to this screen and create one snapshot each time (refering volume id on each time), or you can do it once refering the instance id and console will get both volumes for you and create both snapshots.

Doesn't matter which option you choose there, it will just create snapshot from volume, it will not do anything about your instance. If you want you can add a tag in your snapshot to refer to your instance, but it is just a meta-data.
So in your case you are just creating "backups" of your volumes!

If you lose your volume you can restore it, but if you lose your instance you will have to recreate your instance again (with all details) manually.

If you want to create a "backup" from your instance you need to create an image, which will give you and AMI, not a snapshot.

AMI will "backup" your instance details and will create a snapshot from all instance volumes (not ephemeral ones).

enter image description here

Azize
  • 4,006
  • 2
  • 22
  • 38