Ass ability to move all datasets

This commit is contained in:
2026-09-01 23:59:40 +03:00
parent 2ce4afdfdd
commit b98d7877fc
2 changed files with 20 additions and 18 deletions
+10 -9
View File
@@ -1,7 +1,8 @@
# ZFS Move Over SSH
`zfs-move-over-ssh.sh` snapshots every ZFS filesystem at and beneath a source
dataset, then sends each snapshot to a remote ZFS server over SSH.
`zfs-move-over-ssh.sh` snapshots every ZFS filesystem in a source pool, then
sends each snapshot to a remote ZFS server over SSH. A vdev is the underlying
storage device; ZFS filesystems belong to a pool, so pass the pool name.
For a source tree such as:
@@ -36,13 +37,13 @@ incremental sends or resume tokens.
## Usage
```bash
bash zfs-move-over-ssh.sh [options] SOURCE_ROOT REMOTE_HOST DESTINATION_ROOT
bash zfs-move-over-ssh.sh [options] SOURCE_POOL REMOTE_HOST DESTINATION_ROOT
```
Example:
```bash
bash zfs-move-over-ssh.sh tank/data root@new-server backup/data
bash zfs-move-over-ssh.sh tank root@new-server backup/tank
```
Use a non-standard SSH key or port when needed:
@@ -51,7 +52,7 @@ Use a non-standard SSH key or port when needed:
bash zfs-move-over-ssh.sh \
--identity-file ~/.ssh/zfs-migration \
--ssh-port 2222 \
tank/data admin@new-server backup/data
tank admin@new-server backup/tank
```
Options:
@@ -69,7 +70,7 @@ Options:
1. Confirm the source datasets:
```bash
zfs list -r tank/data
zfs list -r tank
```
2. Confirm remote privileged ZFS access:
@@ -81,19 +82,19 @@ Options:
3. Preview the operation. Review every destination name in the output:
```bash
bash zfs-move-over-ssh.sh --dry-run tank/data admin@new-server backup/data
bash zfs-move-over-ssh.sh --dry-run tank admin@new-server backup/tank
```
4. Run the migration:
```bash
bash zfs-move-over-ssh.sh tank/data admin@new-server backup/data
bash zfs-move-over-ssh.sh tank admin@new-server backup/tank
```
5. Verify the received datasets and data before retiring the source:
```bash
ssh admin@new-server 'sudo zfs list -r backup/data'
ssh admin@new-server 'sudo zfs list -r backup/tank'
```
## Safety and Recovery