On Fri, 2023-12-08 at 12:56 -0500, Tim Evans wrote:
Since tine immemorial (I first touched a UNIX system circa 1984), I
have
used the venerable 'dump' utility to do automated full and
incremental
backups to an NFS-mounted network storage appliance (NAS).
Now, with a brand new laptop, with fresh install using btrfs
filesystems, I find 'dump' does not work on them. (Fortunately, I was
able to use the companion utility 'restore' to recover my /home
backups
and assorted config files from the root filesystem of my old laptop.)
So, I'm looking re-script my backups using btrfs tools. So far, it
appears I cannot do btrfs snapshots to the NAS and I'm not wanting to
attach another disk to the laptop just for snapshots. Are there
analogous (to 'dump' and 'restore') btrfs utilities that can do
backups
this way, and can be scripted?
Whenever someone asks about backup tools, there are usually lots of
answers, so here's mine:
I have BTRFS on my root and /home. My backup target is a USB-attached
dual-slot caddy with a couple of drives in it. They are also BTRFS, and
are formatted RAID-1 in case of hardware issues. My backup tool is
Borg, because a) it's very feature-complete, b) does compression, and
3) does deduplication. I use it via an additional tool called
Borgmatic, which takes charge of scheduling:
$ rpm -qi borgmatic
Name : borgmatic
Version : 1.8.5
Release : 1.fc39
Architecture: noarch
Install Date: Sun 03 Dec 2023 09:43:44 GMT
Group : Unspecified
Size : 1060831
License : GPL-3.0-or-later
Signature : RSA/SHA256, Fri 24 Nov 2023 14:30:30 GMT, Key ID 75cf5ac418b8e74c
Source RPM : borgmatic-1.8.5-1.fc39.src.rpm
Build Date : Mon 20 Nov 2023 15:54:37 GMT
Build Host :
buildvm-x86-32.iad2.fedoraproject.org
Packager : Fedora Project
Vendor : Fedora Project
URL :
https://torsion.org/borgmatic
Bug URL :
https://bugz.fedoraproject.org/borgmatic
Summary : Simple Python wrapper script for borgbackup
Description :
borgmatic (formerly atticmatic) is a simple Python wrapper script for
the Borg backup software that initiates a backup, prunes any old backups
according to a retention policy, and validates backups for consistency.
Also:
https://torsion.org/borgmatic/
Once I had it set up to my liking, I just let it run every night. Every
morning I check (via logs) that it worked without problems. This has
saved me more than once (either from hardware problems or from some
poorly implemented change to my configuration).
I've been generally happy with Borg. My main complaint is that the
config file for Borgmatic is written in YAML, and you are assumed to
know how this works (it's not obvious if you've never used YAML
before).
I used to use rsnapshot, based on rsync. It's somewhat easier to
understand but doesn't do deduplication or compression.
Something people often forget: can you actually restore files from your
backup? Are you sure you know how to do this? Have you written it down
somewhere that won't be lost in the event of disaster?
poc