What is the best way to back up as much as possible of Debian 12 on my laptop to a server that has SSH available? I am currently backing up my users /home/<homedir> folder, but I would like to be able to nuke and restore the system from a backup.
I have ventoy on an external drive if that helps any.
P.S. I would like to be able to do incremental backups too.
The standard answer: don’t backup the system, automate its deployment instead. Backup only data.
Even for a home system? Not a fleet of data center servers. I am currently using rsync to backup /home/<<user>>/ to the ssh server. I tend to make a lot of changes to the base Debian/KDE install.
What kind of changes? Package installation, removal and configuration? Use
apt-mark showmanual
to save list of manually installed packages,dpkg --get-selections | grep 'deinstall$'
to save list of removed packages,debconf --get-selections
to save debconf package settings, backup files that you edited in/etc
. This should be enough for restoration, wouldn’t take a long time for backup and avoid risk of filesystem inconsistency.
Relax And Recover for os level backups. https://relax-and-recover.org/
With rear you can back up your system to pretty much anything. Mounted volume, USB drive, even to a bootable iso.
I use weekly rear backups for my system, and hourly Borg backups for diffs/point in time restore of user data, but you could use rear for an entire system snapshot as well.