[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: backup of backup or alternating backups?



On Mon, 30 Sep 2024, Default User wrote:

Hi!

On a thread at another mailing list, someone mentioned that they, each
day, alternate doing backups between two external usb drives. That got
me to thinking (which is always dangerous) . . .

I have a full backup on usb external drive A, "refreshed" daily using
rsnapshot. Then, every day, I use rsync to make usb external drive B an
"exact" copy of usb external drive A. It seemed to be a good idea,
since if drive A fails, I can immediately plug in drive B to replace
it, with no down time, and nothing lost.

But of course, any errors on drive A propagate daily to drive B.

So, is there a consensus on which would be better: 
1) continue to "mirror" drive A to drive B?
or,
2) alternate backups daily between drives A and B?


IMO it can take days, weeks even months to discover that something has
got corrupted and/or deleted in error.

I don't think either strategy is "better", they have different pros and
cons. But in particular, your strategy doesn't require both drives to be
online at once and at least gives you a one day window to discover that
you've synced corruption.

I think my strategy would be something more akin to the following (I
think rsnapshot can do this but I've not actually used it)

1. Alternate disks (as you are doing)
2. Create a new directory YYYYMMDD and backup into that directory,
creating hard links to the files from the previous backup (two days
before)
3. Delete the oldest directories as/when you start running out of space.


On a slight tangent, how does rsnapshot deal with ext4 uninited extents?
These are subtly different to sparse files, they're still not written to
disk but the disk blocks are explicitly reserved for the file:

truncate (sparse file) vs fallocate (blocks reserved)

I've noticed that, at least on bookworm, lseek for SEEK_HOLE/SEEK_DATA
treats fallocate as a hole similar to a sparse file. I haven't tested
tar with the --sparse option but I suspect it will treat the two types
of file the same too.


Reply to: