Improve documentation of recovering Longhorn volumes
This commit is contained in:
parent
d6f3aadeaf
commit
be17c95d86
1 changed files with 11 additions and 0 deletions
|
@ -62,3 +62,14 @@ To restore a backup, perform the following actions:
|
||||||
2. Enable the "backup-nfs" recurring job for the Longhorn volume.
|
2. Enable the "backup-nfs" recurring job for the Longhorn volume.
|
||||||
3. Disable the "default" recurring job group for the Longhorn volume.
|
3. Disable the "default" recurring job group for the Longhorn volume.
|
||||||
4. Create the PV, PVC and workload as usual.
|
4. Create the PV, PVC and workload as usual.
|
||||||
|
|
||||||
|
## Recovering Longhorn volumes without a Kubernetes cluster
|
||||||
|
|
||||||
|
1. Navigate to the Longhorn backupstore location (`/mnt/longhorn/persistent/longhorn-backup/backupstore/volumes` for us).
|
||||||
|
2. Find the directory for the desired volume: `ls **/**`.
|
||||||
|
3. Determine the last backup for the volume: `cat volume.cfg | jq '.LastBackupName'`.
|
||||||
|
4. Find the blocks and the order that form the volume: `cat backups/<name>.cfg | jq '.Blocks'`.
|
||||||
|
5. Extract each block using lz4: `lz4 -d blocks/XX/YY/XXYY.blk block`.
|
||||||
|
6. Append the blocks to form the file system: `cat block1 block2 block3 > volume.img`
|
||||||
|
7. Lastly we need to fix the size of the image. We can simply append zero's to the end until the file is long enough so `fsck.ext4` does not complain anymore.
|
||||||
|
8. Mount the image: `mount -o loop volume.img /mnt/volume`.
|
||||||
|
|
Loading…
Reference in a new issue