Introduction
Hey, I’ve used Restic to backup some stuff before and now I’m thinking of using it to backup my whole filesystem as part of my Linux configuration.
Solutions I Found
I’ve read the docs, but it doesn’t address the issue of ongoing filesystem writes during a backup, which I heard can cause issues with the backup? To that end, I saw someone else’ setup where we do
export RESTIC_FEATURES="device-id-for-hardlinks=true" restic backup ...
on a fresh BTRFS snapshot.
Queries
-
Is this the best way to do a full filesystem backup?
-
A cursory reading of issue 3041 and PR 4006 seems to suggest enabling the feature flag
RESTIC_FEATURES=device-id-for-hardlinks=truemight be an imperfect solution. But I don’t really understand it for now haha, so I would appreciate a quick rundown of any key drawbacks of enabling this. -
Furthermore, if LUKS full disk encryption is enabled, then a BTRFS snapshot is a snapshot of the decrypted disk information right? If I do a full system restore (e.g. doing a Restic restore at
/mntwhere the target disk is mounted, from within a live USB boot.), I would have to set up the full disk encryption over again. Is there a way to avoid this?Edit: Now that I think about it maybe this isn’t really a problem. I can just setup my target disk with a standard Fedora ISO and enable LUKS during the installation process. Then, I can use
cryptsetup luksOpen(in a live USB boot) and restore from there. This should result in a restored disk with LUKS, right?
-
Or would something like Clonezilla be better for a full system backup?
My end goal is to have a frequently backed up system, so I don’t lose any important data if any sudden and catestropic data loss occurs to me, and to make the backup easy to restore from if I’m panicking from sudden data loss.