Update README.md
This commit is contained in:
parent
e164fc5b4c
commit
acbb403427
1 changed files with 51 additions and 0 deletions
51
README.md
51
README.md
|
|
@ -79,3 +79,54 @@ backup: downloads/akuma-tfjpo7 is a ZFS dataset
|
|||
backup: archiving /mnt/personal/backup/virt-back/1_akuma-2024-07-07.zfs for 1_akuma
|
||||
backup: finished backup for 1_akuma
|
||||
```
|
||||
|
||||
## Restoring from a ZFS Backup
|
||||
|
||||
This section explains how to restore a KVM instance from a ZFS backup using the `virt-back` utility. The process involves extracting the backup archive, restoring the ZFS snapshot, and creating a new VM in TrueNAS Scale using the restored ZFS volume.
|
||||
|
||||
### Step-by-Step Restore Process
|
||||
|
||||
1. **Extract the Backup Archive**: Extract the tar archive to get the ZFS snapshot file and the XML configuration file.
|
||||
2. **Restore the ZFS Snapshot to a New Dataset**: Use the `zfs receive` command to restore the ZFS snapshot to a new dataset.
|
||||
3. **Create a New VM in TrueNAS Scale**: Use the TrueNAS Scale UI to create a new VM and point it to the restored ZFS volume.
|
||||
|
||||
### Detailed Steps
|
||||
|
||||
#### 1. Extract the Backup Archive
|
||||
|
||||
First, extract the tar archive to get the ZFS snapshot file and the XML configuration file. Use the `--strip-components` option to remove the leading directory components if necessary.
|
||||
|
||||
```bash
|
||||
tar -xvf /mnt/personal/backup/virt-back/1_akuma.tar --strip-components=1 -C /mnt/personal/backup/virt-back
|
||||
```
|
||||
|
||||
This command will extract the files directly to the `/mnt/personal/backup/virt-back` directory, removing the leading directory component.
|
||||
|
||||
#### 2. Restore the ZFS Snapshot to a New Dataset
|
||||
|
||||
Use the `zfs receive` command to restore the ZFS snapshot to a new dataset. Assuming the extracted ZFS snapshot file is named `1_akuma-2024-07-07.zfs`:
|
||||
|
||||
```bash
|
||||
zfs receive -F downloads/akuma-tfjpo7-restored < /mnt/personal/backup/virt-back/1_akuma-2024-07-07.zfs
|
||||
```
|
||||
|
||||
This command will restore the ZFS snapshot to the `downloads/akuma-tfjpo7-restored` dataset.
|
||||
|
||||
#### 3. Create a New VM in TrueNAS Scale
|
||||
|
||||
1. **Open TrueNAS Scale UI**: Log in to the TrueNAS Scale web interface.
|
||||
2. **Navigate to Virtual Machines**: Go to the "Virtual Machines" section.
|
||||
3. **Create a New VM**:
|
||||
- Click on "Add" to create a new VM.
|
||||
- Fill in the necessary details for the new VM (e.g., name, CPU, memory).
|
||||
4. **Attach the Restored ZFS Volume**:
|
||||
- In the "Disks" section, add a new disk.
|
||||
- Select "Existing Zvol" and choose the restored ZFS volume (`downloads/akuma-tfjpo7-restored`).
|
||||
5. **Complete the VM Creation**: Finish the VM creation process by following the remaining steps in the UI.
|
||||
|
||||
### Summary
|
||||
|
||||
By following these steps, you can restore the ZFS snapshot and reattach it to a new VM using the TrueNAS Scale UI. This process involves extracting the backup archive, restoring the ZFS snapshot to a new dataset, and creating a new VM in TrueNAS Scale, pointing it to the restored ZFS volume. This approach ensures that the original dataset remains unaffected and allows you to easily restore and reattach your KVM instances.
|
||||
```
|
||||
|
||||
This markdown section provides a clear and concise explanation of the steps required to restore a KVM instance from a ZFS backup, including the necessary commands and instructions for using the TrueNAS Scale UI.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue