I currently use a USB HDD for backing up my main zfs pool using snapshots. The main pool is “zfspool” the backup pool is “backup”. The process for the backup is as follows:
# import pool
zpool import -d /dev/disk/by-id/ata-XXX-part1 backup
# make snapshot
zfs snapshot zfspool@backup-[current date]
# send snapshot
zfs send -I zfspool@backup-[last snapshot] zfspool@backup-[current date] | zfs receive backup/zfspool
# export pool
This replicates any snapshots between the last time I did the backup and the new one to the backup disk and I can use them to restore my data in case the primary pool fails. I disconnect the HDD and keep it in a safe place as my off site backup when not in use.
What I don’t understand is which snapshots are safe to delete from which device without impacting recoverability of other snapshots.
Assuming the following scenario:
on zfspool:
backup@A
backup@B
backup@C
backup@D
Sent to backup:
backup@A
backup@B
backup@C
- Can A and B be deleted from zfspool?
- Can only B be deleted from zfspool?
- Can I delete D from zfspool, create another snapshot referencing C and send that to backup?
- Can A be deleted from backup?
- Can only B be deleted from backup?