BackSnap is a program for backing up btrfs snapshots to an external disk
Why should I use something like this? I already have a reliable backup. I don’t want to take any (!) risks with my backup.
Backsnap is based directly on btrfs. Therefore it can do the following:
backups are snapshots, and fully readable
backups are created differentially by btrfs send/receive
backups are created with CoW
compression is selectable as always with btrfs
all backup operations are performed by btrfs itself
Strictly speaking, BackSnap only works as a wrapper around the original btrfs command.
To the risk:
BackSnap is licensed under the GPL. It goes even further by containing its own source code in the binary
The backups have no special format, but are fully readable snapshots. So you can check at any time whether everything is there in the backup by mounting it. A restore from the backup is also possible with any file manager.
The only place BackSnap writes to, is the drive on which the backup needs to be written
Now I’m looking for “brave” testers for BackSnap
Development status:
I’ve been making my own backups with Backsnap for about 6 months from computers with snapper layout
It is sufficient to start Backsnap via CLI
I also use BackSnap with ssh to backup remote machines
In the meantime I have added a GUI that can make the backup transparently visible
You can now also clean up outdated backups via the GUI
and since June 19, 2023 there is a version supporting timeshift
Since I use snapper myself, everything was adapted to snapper. But I also adapted BackSnap for Timeshift. Therfore i did use a standard install of manjaro xfce in a vm.
In short:
You need to have java installed
version should be 17 or higher
pacman -S jdk-openjdk
sudo archlinux-java set java-20-openjdk
Is it possible to have it NOT be called by snapper/Timeshift (only run it manually in the gui) OR create some kind of cleanup?
I know myself, I WILL forget this and the backup destination will become full.
I would suggest to NOT have the backup-disk connected permanently
Only connect it when you run your backup-script. (Or let the backup-script start automatically on mount). This way you will even be protected against some forms of evil programs.
After using it for 6 months with 5 computers, I can assure you that the backup volume will only grow slowly after the first backups.
Responsible for this are the differential backups and the compression. Somehow I suspect that btrfs is doing a mild form of deduplication in the background.
My volume with 3TB is only 53% full so far, even though manjaro as a “rolling release” is actually the enemy of every differential backup.
P.S.: I call it once a week
The backup strategy is already defined in snapper/Timeshift, and is involved here
This was what I was thinking.
Agree. Could possibly get that invoked in the systemd service, have to look into this. (my noob brain gets exited to learn stuff)
I have been running urbackup for a few years and as I understand it, btrfs kinda deduplicates “out of the box” this way. It checks the “parent” snapshot (subvlume) and links the new snapshot (new subvolume) to that with the exeption of changed files, ie, only a few kb if you haven’t changed anything on the source. With urbackup the changed files are also just patched, but that might be a urbackup thing more than a btrfs thing.
The paragraph above is me mostly speculating and have no basis in reality whatsoever. xD
I will def take a look at this. I also use clonezilla live and make backups once in a while keeping a few backups on a never mounted partition, since I start clonezilla from grub it takes a bit of effort If I “just want to make a quick backup before I start screwing around”, timshift is great, but it is not a backup, this is.
I already back up my home directory (separate partition) with urbackup, so I might have to look into how to exclude that, or not. I’ll just download it and see where I go from there.
BackSnap backups do not have include/exclude option as they always consist of a complete subvolume.
With BackSnap, you don’t have to exclude /home if your /home is already its own subvolume (e.g. subvolume /@home or @home). They create backups of the other subvolume (usually /@ or @). This way nothing from /home is included.
If you want to include /home, you need to make an extra backup of the subvolume of /home (/@home or @home).
Since June 19, 2023, backsnap also supports timeshift.
yeah, I noticed that, I have my home in btrfs but not as a subvol, sooooo… yeah…
I do backups on partition level with clonezilla as well so when I had /home in a subvol (but on other partition), that broke restoring my / partition So I opted to mount it “normally”.
Oddly timeshift works perfectly, I assume it actively excludes /home no matter if its a subvol or not when not clicking the home checkbox.
I am requesting support with things that are connected to storage on my computer but nobody seems to know why I get udisk errors every single boot and shutdown.
Until that issue is fixed for me, I wont play around too much with new storage things.
As of today BackSnap does work for Timeshift and Snapper. It does show some differences in gui (like names for snapshots according to the tool you used to create the snapshots):