Skip to content

Commit 77e21b2

Browse files
authored
Create new Instance from VM backup documentation (#474)
1 parent 2963c20 commit 77e21b2

File tree

5 files changed

+76
-10
lines changed

5 files changed

+76
-10
lines changed
519 KB
Loading
79.9 KB
Loading
27.1 KB
Loading

source/adminguide/backup_and_recovery.rst

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,41 @@ of an expunged Instance will not restore nics and recovery any network which may
161161
not exist. User may however restore a specific volume from an Instance backup and attach
162162
that volume to a specified Instance.
163163

164+
Creating a new Instance from Backup
165+
-----------------------------------
166+
167+
Since CloudStack 4.21, users can now remove the backup offering and expunge or unmanage an instance
168+
that has existing backups, for the supported backup providers — Dummy, NAS, and Veeam.
169+
Additionally, users can create a new instance from a backup using any of these providers.
170+
171+
Each backup now includes metadata that captures the instance’s configuration at the time of backup including service offering,
172+
template, disk offerings for all data volumes, attached networks, and instance-specific settings.
173+
The new instance will be created with the same configuration and data as the original instance at the time the backup was taken.
174+
175+
.. warning::
176+
Users should ensure that the entry for the expunged or unmanaged instance is not purged from the database, as the backup framework relies on it to function correctly.
177+
178+
|B&R-CreateInstanceFromBackup.png|
179+
180+
Users also have the option to customize the configuration of the new instance, similar to deploying a new instance from scratch.
181+
The deployment form will be pre-filled with the values captured in the backup, but users can modify them as needed.
182+
However, the number of volumes in the new instance must match the number of volumes in the backup.
183+
If volume sizes are customized, users must ensure that each volume is at least as large as the corresponding volume in the backup.
184+
Advanced settings are not pre-filled in the form by default, but if left unset, they will automatically be retrieved from the backup metadata.
185+
The Template and ISO can only be updated via the UI if the UUID stored in the backup is no longer available in the environment.
186+
187+
If the original instance from which the backup was created has been expunged, users will be presented with an option to reuse thesame IP address and
188+
MAC address stored in the backup metadata. The new instance will be assigned the same IP and MAC address, provided they are still available in the network.
189+
190+
|B&R-ConfigureInstance.png|
191+
192+
If one or few of the resources stored in the backup such as template, networks etc are no longer available
193+
in the system, the user will be prompted to reconfigure the Instance before creating it from backup.
194+
195+
.. note::
196+
If the backup was created in a release prior to 4.21, the backup metadata won't contain the instance configuration details,
197+
so users would have to fill in the required details by clicking on the Configure Instance button.
198+
164199
Supported APIs:
165200
~~~~~~~~~~~~~~~~
166201

@@ -176,6 +211,7 @@ Supported APIs:
176211
- **listBackups**: lists backups.
177212
- **restoreBackup**: restore a previous Instance backup in-place of a stopped or destroyed Instance.
178213
- **restoreVolumeFromBackupAndAttachToVM**: restore and attach a backed-up volume (of an Instance backup) to a specified Instance.
214+
- **createInstanceFromBackup**: create a new Instance from a backup.
179215

180216

181217
Configuring resource limits on Backups
@@ -211,3 +247,9 @@ the backup size, although the actual backup size may be less than the size use t
211247
.. |B&R-BackupScheduleEntry.png| image:: /_static/images/B&R-BackupScheduleEntry.png
212248
:alt: Creating a backup schedule for an Instance.
213249
:width: 400px
250+
.. |B&R-CreateInstanceFromBackup.png| image:: /_static/images/B&R-CreateInstanceFromBackup.png
251+
:alt: Creating a new Instance from a backup.
252+
:width: 400px
253+
.. |B&R-ConfigureInstance.png| image:: /_static/images/B&R-ConfigureInstance.png
254+
:alt: Configure Instance parameters before creating it from backup.
255+
:width: 700px

source/adminguide/nas_plugin.rst

Lines changed: 34 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -31,14 +31,13 @@ Currently, only backup of VMs from the NFS-based Primary Storage are tested to w
3131
You can also make backups of CEPH-based VMs, but restoring is not possible yet.
3232

3333
The NAS B&R plugin requires admin to first add backup repositories which are
34-
network-attached storage (shared storage). Currently it supports NFS, and may
35-
support other shared storage such as CephFS and CIFS/Samba in future.
34+
network-attached storage (shared storage). It supports NFS, CIFS/Samba and CephFS.
3635

3736
When initiating B&R operations on KVM instance, the assigned backup offering
3837
is used to infer backup repository (NAS) details which are then used to mount
3938
the shared storage temporarily on the KVM host to perform instance backup/restore
4039
disks operations. This also requires that admin installs NAS-storage specific
41-
utilities on the KVM hosts such as nfs-utils/nfs-common (ceph-common, cifs-utils).
40+
utilities on the KVM hosts such as nfs-utils/nfs-common, ceph-common and cifs-utils.
4241

4342
Consider the following mount, typically performed on a KVM/Linux host to mount storage:
4443

@@ -71,15 +70,15 @@ backup.framework.provider.plugin nas
7170
================================= ========================
7271

7372
Once the above two configurations are set, restart the cloudstack-management service. After restart check the Settings of the Zone where you want to enable NAS backups - make sure that the "backup.framework.enabled"="true" on the Setting tab of the Zone. Once this is done, we can add the backup repository for the 'nas' Backup and Recovery plugin.
74-
Navigate to the Configuration -> Backup Repository. Click on 'Add Backup Repository' and fill the form.
73+
Navigate to the Configuration -> Backup Repository. Click on 'Add Backup Repository' and fill the form.
7574

7675
=================== ========================
7776
Field Value
7877
=================== ========================
7978
Name A suitable name to represent the Backup Repository
8079
Address URL, in case of NFS <server IP>:/path
81-
Type NFS ( only NFS type in 4.20)
82-
label.mountopts Any mount point options to be passed while mounting this storage on the hypervisor.
80+
Type NFS / CIFS / CEPH
81+
Mount options Any mount point options to be passed while mouting this storage on the hypervisor.
8382
Zone The zone in CloudStack with which this Backup Repository must be associated.
8483
=================== ========================
8584

@@ -89,7 +88,7 @@ Zone The zone in CloudStack with which this Backup Repository mus
8988

9089
Pay attention to the "Name" given to this repository, as you will have to specify this in the "External ID" field when creating Backup Offerings (Importing backup offering)
9190

92-
Once the Backup Repository is created, we need to add a Backup Offering, in this plugin the Backup offering is a placeholder to associate an instance to a Backup Repository. While creating the Backup Offering, select the desired Backup Repository. Associate the Backup Offering on an instance to create an Adhoc or scheduled backup.
91+
Once the Backup Repository is created, we need to add a Backup Offering, in this plugin the Backup offering is a placeholder to associate an instance to a Backup Repository. While creating the Backup Offering, select the desired Backup Repository. Associate the Backup Offering on an instance to create an Adhoc or scheduled backup.
9392

9493
For the "External ID", please specify the name of the previously created backup repository.
9594

@@ -99,6 +98,28 @@ For the "External ID", please specify the name of the previously created backup
9998

10099
After this has been done, you can go to any Instance view and there will be buttons available for either ad-hoc backup or a scheduled backup of the VM
101100

101+
Quiesce (Filesystem Freeze and Thaw)
102+
------------------------------------
103+
104+
Users can set quiesce to true while creating a backup or a backup schedule.
105+
When a backup is initiated with quiesce enabled, CloudStack uses QEMU guest agent
106+
to freeze the filesystem before starting backup. This operation flushes all dirty
107+
filesystem buffers to disk and quiesces new writes. The filesystem is then thawed
108+
immediately after the backup process starts, keeping the freezing window very short.
109+
110+
|NASB&R-quiesceInstance.png|
111+
112+
This enhancement brings the NAS backup plugin from crash-consistent backups closer to
113+
application-consistent backups.
114+
115+
Points to note:
116+
117+
#. The feature requires qemu-guest-agent to be installed and running on the guest instance.
118+
#. This method does not capture the memory state of the guest. Any data held in application memory
119+
that hasn’t been flushed to disk prior to the filesystem freeze will not be captured.
120+
#. For fully application-consistent backups, guest applications must implement pre-freeze hooks
121+
to flush their internal state to disk before the filesystem is frozen.
122+
102123
Support Information and Limitation
103124
----------------------------------
104125

@@ -121,9 +142,12 @@ in qcow2 format to the backup repository.
121142

122143
For restore operations, the KVM instance must be stopped in CloudStack.
123144
Currently, only volume(s) restoration is supported only to NFS and local storage
124-
based primary storage pools, and restored volumes are fully baked disks (i.e.
145+
based primary storage pools, and restored volumes are fully backed disks (i.e.
125146
not using any backing template file).
126147

127-
Restoring fully expunged and unmanaged instances are not supported. Backup and
128-
restore operations are not fully supported for CKS cluster instances and should
148+
Backup and restore operations are not fully supported for CKS cluster instances and should
129149
be avoided.
150+
151+
.. |NASB&R-quiesceInstance.png| image:: /_static/images/NASB&R-quiesceInstance.png
152+
:alt: Quiesce option while creating backups.
153+
:width: 400 px

0 commit comments

Comments
 (0)