What does zfs receive -F do?

Solution 1:

The -F switch comes in handy if you have messed with the destination dataset after it has been received. Once you do any changes to it (including doing something as innocent as a directory listing as this would change atimes), it is no longer in the state it was in after the initial transfer. Trying to run a plain zfs receive from an incremental data stream created by the other side's zfs send -i tank/dataset@old tank/dataset@new would result in an error. In this case you have two options on the receiver side:

  • you could either revert to the last snapshot manually using zfs rollback
  • or provide the -F switch to zfs receive to let it handle that for you automatically

Of course, it might be a destructive operation, so you have to understand what it is doing before using it. But if all you are doing is copying snapshots over to a non-live "backup" destination where no other data is written to you might miss, it should be safe.

Solution 2:

Others are the experts here on ZFS, I'll simply post this in case you haven't seen it.

Using this option might be necessary when the file system is modified between the time a rollback occurs and the receive is initiated.

From: Solaris - New zfds receive -F option