zfs recursive incremental send/receive - making sure I don't lose data?

Status
Not open for further replies.

Stilez

Guru
Joined
Apr 8, 2016
Messages
529
I've just successfully sent a zfs pool from my main server to a backup using these commands:

On main server: zfs send -vvDRLe mypool@snapshot_20180605_000000
On backup server: zfs receive -vvFsd mypool

It copied some 35 TB (mix of datasets, sub-datasets, and zvols) and took about 8 days to run. I couldn't use the FreeNAS built-in replication method because the snaps aren't related to a periodic snapshot.

Now that's done, I want to run an incremental recursive backup from that snapshot up to last night's nightly snapshot, but I want to be really sure that I don't accidentally destroy data in the receiving pool and have to start again from scratch. The 20180605_000000 snapshot still exists in the original pool. I think these are correct syntax/options, but I'd like to be sure before going ahead:

On main server: zfs send -vvDRLei @snapshot_20180605_000000 mypool@snapshot_20180618_000000
On backup server: zfs receive -vvsd mypool

Are these correct and safe commands? Are they safe against data deletion/rollback by zfs receive on the backup server?
 

PhilipS

Contributor
Joined
May 10, 2016
Messages
179
I would suggest you read up on the R option on zfs send as that can cause data deletion on the receiving side. You can add the "n" option on the receive and it won't actually do anything, but will show you the output to verify it isn't destroying your dataset/snapshots.
 
Status
Not open for further replies.
Top