Protect a volume

Guard volumes against accidental deletion with deletion protection, keep point-in-time copies with snapshots, and back them up with Backup Center.

Protect a volume from accidental deletion with deletion protection, keep point-in-time copies of it with snapshots, and back it up on a schedule with Backup Center.

Before you begin

  • To turn deletion protection on or off, you need the Owner or Contributor role, or a custom role with Manage access to Block & Object Storage, on the subscription or on the project. With any role that has Read access to Block & Object Storage, you can see a volume's protection but not change it.

Turn deletion protection on or off

While deletion protection is on, the console and the REST API refuse to delete the volume. On the volume's page, Delete is disabled until you turn the protection off.

In the console, go to StorageVolumes, and select the volume.

On the Overview tab, turn the Deletion protection switch on or off.

The change takes effect at once. Deletion protection blocks only the deletion. You can still detach, extend, rename, and snapshot the volume. For how to delete a volume and what else blocks a deletion, see Delete a volume.

When the volume is the OS disk of an instance, the console and the REST API also refuse to delete the instance together with its OS disk. To delete such an instance, turn off the volume's protection, or keep the OS disk when you delete the instance. See Delete an instance.

Take snapshots before changes

A volume snapshot is a point-in-time copy of a volume. Take one before an upgrade or a migration, and create a new volume from it if you need the earlier data. The volume stays online while the snapshot is taken. For the steps, see Create volume snapshots and Restore from a snapshot. Snapshots also affect when you can delete the volume. See What blocks a deletion.

Back up a volume with Backup Center

A backup plan backs up the volumes assigned to it on a schedule and keeps each backup for the plan's retention period. To add a volume to a plan, see Assign volumes to a plan. To check whether a plan protects a volume, see Check a single volume. For plans, schedules, and restores, see What is Backup Center?.

On this page