Take for instance a prod server (source) with a zfs dataset that gets snapshotted once a day, and a backup server (destination) that receives those daily snapshots via a zfs send/receive operation. In the beginning a full initial snapshot was sent, and then a daily cron job was set up to each day send an incremental snapshot based off the previous day's snapshot, so it would be something like
On 3, 4, 5, 6, and 7 December, the send operation runs on the source, but the network on the destination was down on 5 and 6 December. The source cronjob doesn't do anything to check what's on the destination server, so the backup server has the snapshots for only 3,4, and 7 December.
Is there going to be any data loss if the source server needs to be restored with the 7 December snapshot? I know you wouldn't be able to roll back to the missing snapshots, but is that the only downside to missing an intermediate snapshot like this?
When Googling I found people saying both ways - some people saying there's no problem, others saying you need all incremental snapshots. It feels like there would be a problem, like if a file was created between the 4 and 5 snapshots, then the incremental between the 6 and 7 snapshot wouldn't include it. But on the other hand, maybe ZFS does something under the hood that would account for something like this.
So which is it? Is it safe to miss intermediary snapshots and all you lose is the ability to roll back to the missed dates? Or are all subsequent snapshots on a backup server potentially ruined if an intermediary is missed?
zfs send -i @daily_20231203 data/set@daily_20231204|ssh backupserver zfs receive backup/data/set
. Each day the two dates increment by one day, so the next day would be zfs send -i @daily_20231204 data/set@daily_20231205
and so forth daily.On 3, 4, 5, 6, and 7 December, the send operation runs on the source, but the network on the destination was down on 5 and 6 December. The source cronjob doesn't do anything to check what's on the destination server, so the backup server has the snapshots for only 3,4, and 7 December.
Is there going to be any data loss if the source server needs to be restored with the 7 December snapshot? I know you wouldn't be able to roll back to the missing snapshots, but is that the only downside to missing an intermediate snapshot like this?
When Googling I found people saying both ways - some people saying there's no problem, others saying you need all incremental snapshots. It feels like there would be a problem, like if a file was created between the 4 and 5 snapshots, then the incremental between the 6 and 7 snapshot wouldn't include it. But on the other hand, maybe ZFS does something under the hood that would account for something like this.
So which is it? Is it safe to miss intermediary snapshots and all you lose is the ability to roll back to the missed dates? Or are all subsequent snapshots on a backup server potentially ruined if an intermediary is missed?