Clone/Restore ZFS pool to/from an external disk

kamzata

Renowned Member
Jan 21, 2011
219
9
83
Italy
I’d like to clone the ZFS rpool/data to an external disk and restore it in case of disk failure.

How should I prepare the external disk and how should I clone and restore the pool?

Edit:

Step 1)

As far I can understand, I can create a new pool with my single external disk running:

Bash:
zpool create rpool-external /dev/disk/by-id/ata-WDC_WD5000BPVT-22HXZT3_WD-WXK1A9158767

Then my external drive is ready.

Step 2)

The VM and CT drives placed in local-zfs are a zvol, right?

So, if I run:

Bash:
root@srvlocal1:~# zfs list
NAME                           USED  AVAIL     REFER  MOUNTPOINT
rpool                         4.26G  1.75T       96K  /rpool
rpool-external                 600K   450G       96K  /rpool-external
rpool/ROOT                    2.58G  1.75T       96K  /rpool/ROOT
rpool/ROOT/pve-1              2.58G  1.75T     2.58G  /
rpool/data                    1.67G  1.75T       96K  /rpool/data
rpool/data/subvol-100-disk-0   335M  7.67G      335M  /rpool/data/subvol-100-disk-0
rpool/data/vm-900-disk-0      1.34G  1.75T     1.34G  -

this is the situation.

How can I backup all the rpool/data datasets (rpool/data/subvol-100-disk-0 and rpool/data/vm-900-disk-0) to the rpool-external and restore them if I'm in needed?
 
Last edited:

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!