Home | 簡體中文 | 繁體中文 | 雜文 | Search | ITEYE 博客 | OSChina 博客 | Facebook | Linkedin | 知乎專欄 | Email

13.12. Backing Up and Restoring ZFS Data

13.12.1. Backing Up a ZFS Snapshot

			
# zfs backup tank/dana@111505 > /dev/rmt/0

# zfs backup pool/fs@snap | gzip > backupfile.gz
			
			

13.12.2. Restoring a ZFS Snapshot

			
# zfs backup tank/gozer@111105 > /dev/rmt/0
.
.
.
# zfs restore tank/gozer2@today < /dev/rmt/0
# zfs rename tank/gozer tank/gozer.old
# zfs rename tank/gozer2 tank/gozer
			
			
			
# zfs rollback tank/dana@111505
cannot rollback to 'tank/dana@111505': more recent snapshots exist
use '-r' to force deletion of the following snapshots:
tank/dana@now
# zfs rollback -r tank/dana@111505
# zfs restore tank/dana < /dev/rmt/0
			
			

13.12.3. Remote Replication of a ZFS File System

# zfs backup tank/neo@today | ssh newsys zfs restore sandbox/restfs@today