From 6e6f06bc4d3081b60cdd9c3d0b58c0c324f9c16e Mon Sep 17 00:00:00 2001 From: clayton Date: Sun, 26 Apr 2020 18:18:55 +0800 Subject: [PATCH 1/2] Add a "Common Tasks" page for volume management (snapshot and revert) --- doc.md | 1 + user/common-tasks/volume-backup-revert.md | 45 +++++++++++++++++++++++ 2 files changed, 46 insertions(+) create mode 100644 user/common-tasks/volume-backup-revert.md diff --git a/doc.md b/doc.md index b28a309a..af4e06db 100644 --- a/doc.md +++ b/doc.md @@ -66,6 +66,7 @@ Core documentation for Qubes users. * [Installing and Updating Software in Dom0](/doc/software-update-dom0/) * [Installing and Updating Software in DomUs](/doc/software-update-domu/) * [Backup, Restoration, and Migration](/doc/backup-restore/) + * [Volume Backup and Revert](/doc/volume-management/) * [DisposableVMs](/doc/disposablevm/) * [Block (or Storage) Devices](/doc/block-devices/) * [USB Devices](/doc/usb-devices) diff --git a/user/common-tasks/volume-backup-revert.md b/user/common-tasks/volume-backup-revert.md new file mode 100644 index 00000000..c3cb4bb1 --- /dev/null +++ b/user/common-tasks/volume-backup-revert.md @@ -0,0 +1,45 @@ +--- +layout: doc +title: Volume Backup and Revert +permalink: /doc/volume-management/ +redirect_from: +- /en/doc/volume-management/ +- /doc/VolumeManagement/ +- /wiki/VolumeManagement/ +--- + +Qubes Volume Backup and Revert +============================== + +With Qubes, it is possible to revert one of a VM's storage volumes to a previous +state using the automatic snapshot that is normally saved every time a VM is +shutdown. (Note that this is a different, lower level activity than the +[Backup, Restoration, and Migration](/doc/backup-restore/) process.) + +In Qubes, when you create a new VM, it's volumes are stored in one of the +system's [Storage Pools](/doc/storage-pools/). On pool creation, a +revisions_to_keep default value is set for the entire pool. (For a pool creation +example, see [Storing AppVMs on Secondary Drives](/doc/secondary-storage/).) +Thereafter, each volume associated with a VM that is stored in this pool +inherits the pool default revisions_to_keep. + +For the private volume associated with a VM named vmname, you may inspect the +value of revisions_to_keep from the dom0 CLI as follows: + + qvm-volume info vmname:private + +The output of the above command will also display the "Available revisions +(for revert)" at the bottom. For a very large volume in a small pool, +revisions_to_keep should probably be set to the minimum value of 1 to minimize +the possibility of the pool being accidentally filled up by snapshots. For a +smaller volume for which you would like to have the future option of reverting, +revisions_to_keep should probably be set to at least 2. To set +revisions_to_keep for this same VM / volume example: + + qvm-volume config vmname:private revisions_to_keep 2 + +With the VM stopped, you may revert to an older snapshot of the private volume +from the the above list of "Available revisions (for revert)", where the last +item on the list with the largest integer is the most recent snapshot: + + qvm-volume revert vmname:private \ No newline at end of file From f8c793847f8b4a37590d18d7451381b66f080db2 Mon Sep 17 00:00:00 2001 From: clayton Date: Sun, 26 Apr 2020 18:28:41 +0800 Subject: [PATCH 2/2] Adjusted naming. --- doc.md | 2 +- user/common-tasks/volume-backup-revert.md | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/doc.md b/doc.md index af4e06db..54ebdd3f 100644 --- a/doc.md +++ b/doc.md @@ -66,7 +66,7 @@ Core documentation for Qubes users. * [Installing and Updating Software in Dom0](/doc/software-update-dom0/) * [Installing and Updating Software in DomUs](/doc/software-update-domu/) * [Backup, Restoration, and Migration](/doc/backup-restore/) - * [Volume Backup and Revert](/doc/volume-management/) + * [Volume Backup and Revert](/doc/volume-backup-revert/) * [DisposableVMs](/doc/disposablevm/) * [Block (or Storage) Devices](/doc/block-devices/) * [USB Devices](/doc/usb-devices) diff --git a/user/common-tasks/volume-backup-revert.md b/user/common-tasks/volume-backup-revert.md index c3cb4bb1..48a4a42e 100644 --- a/user/common-tasks/volume-backup-revert.md +++ b/user/common-tasks/volume-backup-revert.md @@ -1,11 +1,11 @@ --- layout: doc title: Volume Backup and Revert -permalink: /doc/volume-management/ +permalink: /doc/volume-backup-revert/ redirect_from: -- /en/doc/volume-management/ -- /doc/VolumeManagement/ -- /wiki/VolumeManagement/ +- /en/doc/volume-backup-revert/ +- /doc/VolumeBackupRevert/ +- /wiki/VolumeBackupRevert/ --- Qubes Volume Backup and Revert