|
| 1 | +.. Licensed to the Apache Software Foundation (ASF) under one |
| 2 | + or more contributor license agreements. See the NOTICE file |
| 3 | + distributed with this work for additional information# |
| 4 | + regarding copyright ownership. The ASF licenses this file |
| 5 | + to you under the Apache License, Version 2.0 (the |
| 6 | + "License"); you may not use this file except in compliance |
| 7 | + with the License. You may obtain a copy of the License at |
| 8 | + http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | + Unless required by applicable law or agreed to in writing, |
| 10 | + software distributed under the License is distributed on an |
| 11 | + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| 12 | + KIND, either express or implied. See the License for the |
| 13 | + specific language governing permissions and limitations |
| 14 | + under the License. |
| 15 | +
|
| 16 | +.. _NAS Backup and Recovery Plugin: |
| 17 | + |
| 18 | +NAS Backup and Recovery Plugin |
| 19 | +============================== |
| 20 | + |
| 21 | +About the NAS Backup and Recovery Plugin |
| 22 | +---------------------------------------- |
| 23 | + |
| 24 | +The NAS Backup and Recovery Plugin provider simple B&R operations for KVM |
| 25 | +instances to any shared storage (NAS). It is based on `libvirt push backup mode |
| 26 | +<https://libvirt.org/kbase/live_full_disk_backup.html>`_ |
| 27 | +to take full instance backups (qcow2) and requires libvirt-7.2.0 and QEMU-4.2, |
| 28 | +or high versions on the KVM hosts. |
| 29 | + |
| 30 | +The NAS B&R plugin requires admin to first add backup repositories which are |
| 31 | +network-attached storage (shared storage). Currently it supports NFS, and may |
| 32 | +support other shared storage such as CephFS and CIFS/Samba in future. |
| 33 | + |
| 34 | +When initiating B&R operations on KVM instance, the assigned backup offering |
| 35 | +is used to infer backup repository (NAS) details which are then used to mount |
| 36 | +the shared storage temporarily on the KVM host to peform instance backup/restore |
| 37 | +disks operations. This also requires that admin installs NAS-storage specific |
| 38 | +utilities on the KVM hosts such as nfs-utils/nfs-common (ceph-common, cifs-utils). |
| 39 | + |
| 40 | +Consider the following mount, typically performed on a KVM/Linux host to mount storage: |
| 41 | + |
| 42 | + mount -t <nas/storage type> -o <mount options> <address> <mount point> |
| 43 | + |
| 44 | +Some examples for variety of shared storage can be: |
| 45 | + |
| 46 | + mount -t nfs 10.10.1.10:/export /target -o vers=4.2,defaults |
| 47 | + |
| 48 | + mount -t ceph 10.10.1.10,10.10.1.11,10.10.1.12:/ /target -o name=user,secret=xyz,defaults |
| 49 | + |
| 50 | +The backup repository is designed to accept these parameters (type, address and |
| 51 | +mount options) as configurations to be used to execute mount operations such as |
| 52 | +illustrated above. |
| 53 | + |
| 54 | +With 'nas' B&R plugin enabled, after a backup repositories are added, root |
| 55 | +admins can create new backup offerings by selecting the zone and the backup |
| 56 | +repository. These backup offerings are then assigned and used with KVM instances |
| 57 | +to perform support B&R actions and operations. |
| 58 | + |
| 59 | +Support Information and Limitation |
| 60 | +---------------------------------- |
| 61 | + |
| 62 | +The NAS B&R plugin has been tested with EL8, EL9, Ubuntu 22.04 and 24.04. Older |
| 63 | +KVM distros such as EL7, Ubuntu 20.04 etc may not work due to libvirt/qemu |
| 64 | +version requirements. Other supported KVM-distros are not tested but may work |
| 65 | +such as OpenSUSE 15, Debian 11 and Debian 12. |
| 66 | + |
| 67 | +Instance backups are full disk backups and limited by libvirt's ability to |
| 68 | +initiate and handle backup. All such backups are exported and stored in qcow2 |
| 69 | +format. Due to this, restore operation are supported for volumes of type qcow2 |
| 70 | +and limited to NFS and local storage based primary storage pools. |
| 71 | + |
| 72 | +For running instances, their disks (of any format/storage type) are backed up by |
| 73 | +libvirtd's push based efficient-backup mechanism exported as qcow2 disks on the |
| 74 | +backup repository. |
| 75 | + |
| 76 | +For stopped instances, `qemu-img` is used to convert and export full-disk backup |
| 77 | +in qcow2 format to the backup repository. |
| 78 | + |
| 79 | +For restore operations, the KVM instance must be stopped in CloudStack. |
| 80 | +Currently, only volume(s) restoration is supported only to NFS and local storage |
| 81 | +based primary storage pools, and restored volumes are fully baked disks (i.e. |
| 82 | +not using any backing template file). |
| 83 | + |
| 84 | +Restoring fully expunged and unmanaged instances are not supported. Backup and |
| 85 | +restore operations are not fully supported for CKS cluster instances and should |
| 86 | +be avoided. |
0 commit comments