Skip to content
This repository has been archived by the owner on Mar 1, 2022. It is now read-only.

A quick dirty zfs send & receive (back and restore)

Rod Myers edited this page Nov 29, 2019 · 1 revision

To import the external drive, all as root;

zpool import {this will show the pool ID#}

zpool import 4173329554950097962 {the ID of my external drive}

zfs mount {this should show it mounted on the /}

To backup to the external drive;

zfs send {last snapshot. If no snapshot, spool/directory}:

zfs list -t snapshot {grab the latest snapshot}

zfs send (latest snapshot) > /zfs_backup/(name) {or where ever your zfs back pool is located}

zfs export (pool name) {to un-mount to new system}

To restore from the external drive;

zpool import 4173329554950097962 {the ID of my external drive}

zfs receive -F (zpool)/home < /zfs_backup/(name) {or where ever your zfs back pool is located}

To do an incremental backup to the external drive;

zfs send -I (zpool)/(old snapshot) (zpool)/(new snapshot) > zfs_backup/(name) {or where ever your zfs back pool is located}