complete replication of a dataset using zfs_autobackup? #270
Replies: 2 comments 4 replies
-
yes, you can use https://github.com/psy0rz/zfs_autobackup/wiki/Manual#step-34-transferring-snapshots |
Beta Was this translation helpful? Give feedback.
-
Thanks for reply @psy0rz . Unfortunately, I don't think it's quite what I need, since I want these 'other snapshots' to disappear on the target when they disappear from the source, which the --other-snapshots option specifically does not do - "These other snapshots will never be destroyed". I tested and as far as I can see, it's true - once an 'other snapshot' is sent to the target, your only option for later removal is to remove it manually. |
Beta Was this translation helpful? Give feedback.
-
Hi all, and thanks @psy0rz for such a great tool!
In my previous homegrown ZFS backup script, I was able to completely replicate a data set, including all/any other random manual snapshots I'd taken on the source, to a target. If I then subsequently deleted any of the random manual snaps on the source, they'd also disappear on the target at next backup.
Checking the script, I can see that initially, I'd take a snapshot THIS_BACKUP_SRC, and fully replicate it like this:
zfs send --replicate "${THIS_BACKUP_SRC}" | zfs receive -Fu "${DST_POOL}/${SRC_FS}"
For subsequent backups, I take another snapshot THIS_BACKUP_SRC and then do an incremental replication send from PREVIOUS_BACKUP_SRC onwards:
zfs send --replicate -I "${PREVIOUS_BACKUP_SRC}" "${THIS_BACKUP_SRC}" | zfs receive -Fu "${DST_POOL}/${SRC_FS}"
Is there any way that I can use zfs_autobackup like this?
Sorry if this is documented somewhere!
Thanks, Andy
Beta Was this translation helpful? Give feedback.
All reactions