Zfs backups

From wikinotes
Revision as of 16:30, 2 July 2022 by Will (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

zfs send/receive

todo

multi-volume tar

The most professional way of performing a backup of a large dataset is having another server, and using zfs send. But if you're looking for a cheaper solution, you can use tar.

# Create a snapshot of your dataset.
# this way, you are ensuring that all information is consistent
# and complete for that moment in time.
sudo zfs snapshot -r zroot/media@2017_09_02_hddbackup  

# navigate to backup
cd zroot/media/.zfs/snapshots/2017_09_02_hddbackup     

# mount your external HDD
# (you should have already formatted/partitioned it) 
# (to UFS using gpart)
mount /dev/yourhdd  /mnt/backup                        

tar -cvzf --multi-volume --file=/mnt/backup/backup.tar <files>