mcst-linux-kernel/patches-2024.06.26/lxd-3.0.0/0050-doc-Tweak-backup.md.patch

52 lines
2.0 KiB
Diff

From 1b4c79e4cfd4051548dc0ad06ad5219bb11130af Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?St=C3=A9phane=20Graber?= <stgraber@ubuntu.com>
Date: Mon, 16 Apr 2018 17:57:51 +0200
Subject: doc: Tweak backup.md
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
---
doc/backup.md | 18 ++++++++++++++----
1 file changed, 14 insertions(+), 4 deletions(-)
diff --git a/doc/backup.md b/doc/backup.md
index 0f7b7d76..91b122ee 100644
--- a/doc/backup.md
+++ b/doc/backup.md
@@ -3,12 +3,13 @@
To backup a LXD instance different strategies are available.
## Full backup
-This requires that the whole `/var/lib/lxd` folder will be backuped up.
+This requires that the whole `/var/lib/lxd` or
+`/var/lib/snap/lxd/common/lxd` (for the snap) folder be backuped up.
Additionally, it is necessary to backup all storage pools as well.
-In order to restore the LXD instance the old `/var/lib/lxd` folder needs to be
-removed and replaced with the `/var/lib/lxd` snapshot. All storage pools
-need to be restored as well.
+In order to restore the LXD instance the old `lxd` folder needs to be
+removed and replaced with the `lxd` snapshot. All storage pools need to
+be restored as well.
## Secondary LXD
This requires a second LXD instance to be setup and reachable from the LXD
@@ -37,6 +38,15 @@ accessible before the container can be imported. For example, if the
container's storage volume got unmounted the user is required to remount it
manually.
+The container must be available under
+`/var/lib/lxd/storage-pools/POOL-NAME/containers/NAME` or
+`/var/lib/snap/lxd/common/lxd/storage-pools/POOL-NAME/containers/NAME`
+in the case of the LXD snap.
+
+LXD will then locate the container and read its `backup.yaml` file,
+creating any missing database entry.
+
+
If any matching database entry for resources declared in `backup.yaml` is found
during import, the command will refuse to restore the container. This can be
overridden running