Keep the following key points in mind when you receive a file system snapshot:
The snapshot and the file system are received.
The file system and all descendent file systems are unmounted.
The file systems are inaccessible while they are being received.
The original file system to be received must not exist while it is being transferred.
If a conflicting file system name exists, zfs rename can be used to rename the file system.
For example:
# zfs send tank/gozer@0830 > /bkups/gozer.083006 # zfs receive tank/gozer2@today < /bkups/gozer.083006 # zfs rename tank/gozer tank/gozer.old # zfs rename tank/gozer2 tank/gozer |
If you make a change to the destination file system and you want to do another incremental send of a snapshot, you must first rollback the receiving file system.
For example, if you make a change to the file system as follows:
host2# rm newtank/dana/file.1 |
And you do an incremental send of tank/dana@snap3, you must first rollback the receiving file system to receive the new incremental snapshot. You can eliminate the rollback step by using the -F option. For example:
host1# zfs send -i tank/dana@snap2 tank/dana@snap3 | ssh host2 zfs recv -F newtank/dana |
When you receive an incremental snapshot, the destination file system must already exist.
If you make changes to the file system and you do not rollback the receiving file system to receive the new incremental snapshot or you do not use the -F option, you will see the following message:
host1# zfs send -i tank/dana@snap4 tank/dana@snap5 | ssh host2 zfs recv newtank/dana cannot receive: destination has been modified since most recent snapshot |
The following checks are performed before the -F option is successful:
If the most recent snapshot doesn't match the incremental source, neither the rollback nor the receive is completed, and an error message is returned.
If you accidentally provide the name of different file system that doesn't match the incremental source to the zfs receive command, neither the rollback nor the receive is completed, and the following error message is returned.
cannot send 'pool/fs@name': not an earlier snapshot from the same fs |