Software >> OS >> Unix >> Solaris >> zfs >> how to backup and restore zfs snaphotSaving a ZFS SnapshotThe simplest form of the zfs send command is to save a copy of a snapshot. For example:
#
You can save incremental data by using the zfs send
#
Note that the first argument is the earlier snapshot and the second argument is the later snapshot. If you need to store many copies, you might consider compressing a ZFS snapshot stream representation with the gzip command. For example:
#
Restoring a ZFS SnapshotWhen you restore a file system snapshot, the file system is restored as well. The file system is unmounted and is inaccessible while it is being restored. In addition, the original file system to be restored must not exist while it is being restored. If a conflicting file system name exists, zfs rename can be used to rename the file system. For example: # You can use zfs recv as an alias for the zfs receive command. When you restore an incremental file system snapshot, the most recent snapshot must first be rolled back. In addition, the destination file system must exist. In the following example, the previous incremental saved copy of # During the incremental restore process, the file system is unmounted and cannot be accessed.
|