Skip to navigation

EC2: Restore Volumes in Place

Who can use this feature

Anyone with these permissions: Restore resources

Restoring the volumes of an existing EC2 instance in place returns it to the state of an Eon snapshot without creating a new instance. The instance keeps its ID, network interfaces, private IP addresses, and configuration.

This article explains how to restore the volumes of an AWS EC2 instance in place from the Eon console, where the option is called Restore disks in place.

To restore into a new instance instead, see EC2: Restore an Instance. To restore a single volume as a new volume, see EC2: Restore a Volume.

Restore the volumes of an instance

You can start from the inventory page in the Eon console.

Eon stops the instance while it swaps the volumes, which interrupts anything running on it.

Before you start

Before you restore the volumes of an instance in place, make sure:

  • The restore account is connected for the AWS account that contains the instance. Its permissions version is 2.2.0 or later, and the in-place restore option is turned on. For instructions, see Turn on in-place restore.
  • The instance is running or stopped, doesn’t boot from an instance store, and isn’t in an Auto Scaling group.
1

Find the snapshot you want to restore

  1. In your inventory, select the EC2 instance whose volumes you want to restore. The resource details panel opens.

  2. Click the Eon snapshots tab. You’ll see a calendar view with colored dots on the days when snapshots were taken. There can be more than one snapshot per day.

    When you click a day, a list of Eon snapshots taken that day is displayed below the calendar.

  3. Expand the snapshot you want to restore. Under What do you want to restore?, select Restore disks in place, and then click Restore. The Restore disks in place wizard opens.

2

Choose the volumes to restore

In the Disks step, Eon chooses the restore account and runs a plan check on the live instance. The read-only Restore account block shows the name of the restore account Eon uses. The plan check lists each volume of the snapshot in a table.

ColumnShows
SlotThe boot or data slot the restored volume takes, such as Boot (/dev/xvda) or /dev/sdf.
Snapshot diskThe ID of the volume in the snapshot.
Attached nowThe volume in that slot on the instance now.
StatusSame disk when the snapshot’s volume is still in its slot, Different disk when another volume is in the slot, Empty slot when no volume is in the slot, or LUN needed when the snapshot doesn’t record the volume’s device name. A volume marked LUN needed always has a blocker, so it can’t be selected and there’s no LUN to enter.
SizeThe size the restored volume gets, which is never smaller than the volume it replaces. When it differs from the volume it replaces, the column shows both sizes.
  1. Review the plan check results. If This VM’s disks can’t be restored in place appears, the instance has a blocker. If a volume can’t be restored, it’s listed with the reason and can’t be selected. For what each result means, see Plan check results.

  2. Clear the volumes you don’t want to restore. Eon selects every volume that can be restored.

  3. Click Next.

Volumes that were added to the instance after the snapshot was taken appear under Stays attached. Eon doesn’t touch them.

3

Review and start the restore

In the Review step, Eon summarizes how many of the snapshot’s volumes it restores into the instance, and shows the Restore account block again.

  1. Select the checkbox for each warning under Acknowledge before you continue. The warnings that appear depend on the instance and your selection.

  2. To choose whether the instance is running after the restore, turn Start instance after restore on or off. If you don’t change the switch, Eon starts the instance after the swap only when the instance was running just before Eon stopped it.

  3. Click Restore disks. Eon starts the asynchronous restore job.

If the instance’s volumes change while you review them, or Eon would now choose a different restore account, Eon asks you to review the changes or plan the restore again before you can restore.

You can monitor the restore job on the Restore jobs tab in the Jobs page. The job type is EC2 in-place disk restore.

When the restore job succeeds, the restored volumes are in the same slots as the volumes they replaced. The instance is running only if Eon started it.

Plan check results

The plan check reads the instance live, so the result reflects its volumes at the moment you open the wizard. The wizard words each blocker and warning slightly differently from the descriptions below.

Restore account

You don’t choose the restore account. Eon considers the restore accounts connected for the AWS account that contains the instance. Of these, it keeps the active ones in the project that your role allows as a restore destination. Eon swaps the volumes with the one that passes every check.

When no restore account passes every check, the plan check lists the blockers of the restore account closest to working, together, under This VM’s disks can’t be restored in place. When your role allows none of the restore accounts, the plan check fails with You can’t restore this VM’s disks in place: permission denied: restore account access restricted by role. Ask an administrator to change your role’s restore destination limits.

Instance blockers

A blocker at this level disables the restore for every volume.

BlockerWhat to do
The instance no longer exists.Restore into a new instance instead.
The instance is starting, stopping, or changing state.Wait until the instance is running or stopped, and then run the plan check again.
No restore account is connected for the instance’s cloud account.Connect a restore account for the AWS account that contains the instance, and then try again.
The restore account’s role predates in-place volume restore.Update the restore account’s permissions to version 2.2.0 or later, and then try again.
The restore account doesn’t allow in-place volume restore.Update the restore account with EnableEc2InPlaceRestore set to true, and with EC2 restore enabled, and then try again.
Another in-place restore of this instance is still running.Wait for the other restore to finish.
A scaling group manages the instance and would replace or restart it.Use EC2: Restore an Instance instead.
The instance boots from an instance store, which can’t be stopped.Use EC2: Restore an Instance instead.

Volume blockers

A volume blocker disables only the affected volume. The wizard lists it with the volume’s ID and the reason it can’t be restored, and you can restore the instance’s other volumes.

BlockerWhat to do
The volume is no longer attached and the snapshot doesn’t record which slot it held.Restore the volume as a new volume with EC2: Restore a Volume.

Warnings to acknowledge

A warning doesn’t block the restore. You acknowledge each warning that applies on the Review step before you can start.

WarningShown when
Eon stops the instance while it swaps the volumes.Every restore.
The instance’s ephemeral public IP address is released when it stops, and it gets a new one when it starts.The instance has an auto-assigned public IPv4 address.
Data on instance-store volumes is lost when the instance stops.The instance type has instance-store volumes.
Not every volume of the snapshot is selected. A file system or volume group that spans volumes may come back inconsistent.You leave out any of the snapshot’s volumes.
A slot holds a different volume than the one the snapshot recorded. That volume is detached and kept.The volume attached at a device name isn’t the one the snapshot recorded.

What happens during the restore

Eon restores the data first, so the instance is unavailable only while Eon swaps the volumes:

  1. Eon restores each selected volume from the snapshot into a new volume while the instance keeps running.

  2. Eon skips the scheduled backups and scans of the instance that haven’t started yet. They appear as Skipped in the job list. If a backup of the instance has already started, Eon waits until it has captured the volumes, which usually takes a few minutes.

  3. Eon checks the instance’s volumes again. If they changed since you reviewed them, the restore fails before it stops the instance.

  4. Eon stops the instance, detaches the selected volumes, and attaches the restored volumes in the same slots.

  5. Eon starts the instance if you chose to, or if you left the switch unchanged and the instance was running before the stop.

Volumes that you didn’t select stay attached and aren’t changed.

Backups and scans after the restore

For one hour after the restore, Eon holds the scheduled backups and scans of the instance. When the hour ends, a held scheduled backup runs if its schedule window is still open. If the window has closed, the backup appears as Skipped.

On-demand backups aren’t held. Starting an on-demand backup of the instance ends the hold early.

What happens to the original volumes

Eon keeps each original volume, detached and marked with the job ID, and never deletes it. The originals stay in your account and incur cost until you delete them. Eon tags each detached original volume with eon:in-place-restore:job-id, eon:in-place-restore:instance-id, and eon:in-place-restore:device.

The restore job’s details list each swap under Disk swap: the Slot, the Original disk (kept), and the Restored disk. The state next to the instance’s ID is Swapped after a successful restore. While the swap runs it shows Swap in progress. If a job ends while it still shows that state, check which volumes are attached to the instance.

There’s no way to revert a restore in Eon. To go back to an original volume, stop the instance, detach the restored volume from the slot that Disk swap lists, and attach the original there.

If the restore fails

What Eon does depends on how far the restore got:

  • Before Eon stops the instance: The instance isn’t changed, and Eon deletes the volumes it restored.

  • After the stop, before the swap: Eon starts the instance if it was running before, and deletes the volumes it restored.

  • During the swap: Eon puts the original volumes back in their slots, starts the instance if it was running before, and deletes the volumes it restored. The job’s Disk swap state is Original disks put back.

  • If Eon can’t put the original disks back: The state is Putting the originals back failed, and Eon deletes nothing. The original volumes and the restored volumes are both kept, so you can attach the ones you want. The instance stays stopped, unless every slot again holds its original disk or a disk the job never touched. In that case Eon starts it if it was running before.

  • If the instance doesn’t start again after Eon puts the original disks back: The job fails and the instance stays stopped. Eon still deletes the restored disks. Start the instance yourself.

  • If the instance doesn’t start after a successful swap: The job fails and the instance keeps the restored volumes. Start the instance yourself, or stop it, detach the restored volumes, and attach the original volumes.

Turn on in-place restore

In-place restore is off by default, because it lets Eon stop and start any instance in the AWS account and detach and attach any of its EBS volumes. Turn it on when you connect the restore account, or when you update its permissions.

  • CloudFormation: On the Specify stack details page, set the EnableEc2InPlaceRestore parameter to true. The restore account, organization, and multi-account templates all have this parameter.

  • Terraform: In the Eon restore account module block, set enable_ec2_in_place_restore = true. The restore-account-org module has the same variable.

The option takes effect only when EC2 restore is also enabled. For the connection steps, see AWS: Connect Restore Accounts. To update an existing restore account, see AWS: Update Permissions.

With the option on, Eon attaches one more managed policy to the restore role: EonRestoreAccountEc2InPlaceRestorePolicy, or <role_name>Ec2InPlaceRestorePolicy when you use role-scoped resource names. It grants these permissions:

PermissionResourcesPurpose
ec2:StopInstances, ec2:StartInstances, ec2:DetachVolume, ec2:AttachVolume, ec2:ModifyInstanceAttributeEvery instance and volume in the AWS accountStop the instance, swap the volumes, set the restored volumes’ Delete on termination setting to match the originals, and start the instance.
ec2:CreateTags, ec2:DeleteTagsVolumes, limited to tag keys that start with eon:in-place-restore:Tag the detached original volumes so you can find them, and remove the tags from volumes that return to service.

The policy also denies tagging a volume with eon:service after the volume is created. ec2:DeleteVolume stays limited to volumes that carry eon:service, so the restore role can’t delete your original volumes, and Eon never does.