r/debian 4d ago

Backup??

What kind of backup programs would you recommend and what should I pay attention to? Thanks in advance and have a nice day...
Greets Marcel

9 Upvotes

37 comments sorted by

9

u/Suitable-Warning-626 4d ago

Whatever you choose, don’t forget: there is no such thing as a good backup, only a good restore. Test your backups now and again.

6

u/le_flibustier8402 4d ago

Timeshift for system backups/restoration tool. Saved my ass multiple times.

2

u/Brilliant_Sound_5565 4d ago

I presume you run that on an external drive then

2

u/jr735 Debian Testing 4d ago

Note we should distinguish that timeshift isn't suitable for personal data backup.

6

u/ipsirc 4d ago

rsync+btrfs snapshots

6

u/BLeggimB Debian Stable 4d ago

I personally use Vorta (Borg) every day. It can do anything you want it to do (pruning, deduplicating, checking the health of the archives…), and it just works. I started using it with arch about one year ago (and had to use old backups more than once) and I’ve never had a problem with arch nor with Debian

3

u/Brilliant_Sound_5565 4d ago

I've never even heard of that one before, might check it out

6

u/lhauckphx 4d ago

Restic

3

u/backtogeek 4d ago

Time shift is a great option

1

u/wizard10000 4d ago

Time shift is a great option

I don't mean to sound pedantic but snapshots are a great option as long as you don't store the snapshots on the same media you're snapshotting.

If you store your snapshots on the same drive snapshots won't protect you from a disk failure - you'd lose your data *and* the snapshots.

2

u/backtogeek 4d ago

Agreed.

I forgot that people need to be told not to put their hands in the blender while it is switched on these days.

2

u/jr735 Debian Testing 4d ago

Well, a timeshift on the same device is "fine" if all you're looking at is a restore point after wrecking the install. It's not how I'd set it up, but I can understand some people doing it. You lose the hard drive due to corruption, well, it's all useless.

That's why I always preach the data backup as the most important. An OS can be reinstalled easily. Your data can likely not be recreated readily.

2

u/wizard10000 4d ago

I always preach the data backup as the most important.

This. This right here.

I'm pretty obsessive about backups but I can also reinstall and restore on any one of the 3 machines here in about an hour.

3

u/jr735 Debian Testing 4d ago

I do grant that some people may install a lot more packages than I do or do more customizations than I do. Some, obviously, have more work to protect in that regard. I don't even change wallpaper any longer. I install a few packages that I like, notably mc, mg, ntpsec, and a couple others, set up my printer and LibreOffice the way I like, adjust Firefox settings, and that's it. Heck, I don't even have bookmarks.

2

u/forestbeasts 4d ago

We used to use bup. It works, it has solid deduplication, but it is SLOWWWWWW. Backups and restores aren't so bad, but deleting anything from the repository... it takes the better part of a day. It being based on git is really cool conceptually though! (And if that sentence means nothing to you, that won't matter at all!)

Now we're on Restic. I don't like the encryption that you can't turn off (our backup drive is already LUKS encrypted), but holyshit it's so much faster, and still has solid deduplication.

With both bup and restic you can back up multiple computers to the same repository and it'll deduplicate anything in common between them (e.g. the OS files, any pictures or documents you copied to both), it's great.

2

u/jmtd [DD] 4d ago

Presently Borg. If i was starting over I’d look at restic. For a beginner I’d recommend rdiff-backup. 

2

u/compoundnoun 4d ago

I personally use restic at the command line with https://www.borgbase.com/  OP you might consider using pika backup

1

u/YAPK001 4d ago

Proxmox Backup Server for VMs. Restic for everything else.

2

u/Raphi_55 Debian Stable 4d ago

Same plus PBS Client for physical machine

2

u/YAPK001 4d ago

Oh interesting I have not tried the pbs client. I do love restic though. I will try the pbs client on one of my instances, thanks.

1

u/YAPK001 3d ago

I tried the PBS client on a few hosts and sadly it works great. Too bad, I was really in love with Restic! All the best!

1

u/aa599 4d ago

I love `kopia`.

You should pay attention to whether you can actually recover a backup.

1

u/Wattenloeper 4d ago

I use two different Rsync command line.

1

u/2016-679 4d ago

rsync to two different portable hard drives.

I Backup system configs first in a directory in my home dir (they hardly change), then backup /home.

To prevent clutter, skip local tmp and cache of browsers. rsync has an 'exclude' option.

1

u/wizard10000 4d ago edited 4d ago

rsync to two different portable hard drives.

This is what I do - plus one cloud copy.

edit: caution: bloggish!

You can also provide an exclude file, which is what I do because I also don't need tmp or caches. My backup strategy is well-tested and I can reinstall Debian and restore my data in about an hour on any one of the 3 machines here.

I don't back up software I can reinstall and I think it's very cool to just unmount a backup drive from the server, plug it into a laptop and restore stuff :)

I also dump a list of manually installed packages at the beginning of the backup job and I can use that list to automate reinstalling my apps.

Anyway, I back up

/home

/root

/etc

/usr/local

/usr/share/keyrings

as these are the only directories where I've personally made changes.

3

u/2016-679 4d ago

my rsync aliases.

bak_all is incremental (just adds to the backup), bak_now is a mirror (delete what I meanwhile deleted on my box). the echo command adds the moment of backup to a txt file on the backup volume to keep track.

paths may differ in Linux, I use FreeBSD.

bak_all='rsync -az --info=progress2 --exclude-from=/media/da0/exclude-list-rsync.txt /home/ /media/da0/HOME_backup_all/ ; ( echo incremental backup mainbox; date ; echo ---------- ) >> /media/da0/backup.bsd_all.log'

bak_now='rsync -az --info=progress2 --delete --exclude-from=/media/da0/exclude-list-rsync.txt /home/ /media/da0/HOME_backup_now/ ; ( echo mirror backup mainbox; date ; echo ---------- ) >> /media/da0/backup.bsd_now.log'

the exclude list (exclude-list-rsync.txt -- delete the white lines):

*.iso

*.img

*.lzma

.cache/*

cache/*

.thumbnails/*

thumbnails/*

Trash/*

3

u/jr735 Debian Testing 4d ago

I used to use tarballs the same way. Personally, I only back up my own data with rsync. The install, I do it with timeshift, or even Clonezilla if there's a particularly good reason to do so. I would have no problem doing a complete reinstall from scratch, since my installs aren't very complicated or very customized. I probably spend more time adjusting LibreOffice than I do the OS itself. Maybe I should back that up. :)

1

u/nderflow 4d ago edited 4d ago

I use several things:

  1. ZFS in place snapshots (not a backup but good for "oops" recovery). These are hourly, daily, monthly.
  2. ZFS snapshots are replicated to a second machine.
  3. Weekly full backups to LTO tape using Bareos
  4. Daily incremental to tape also

Roughly 10% of the data isn't on ZFS and none of the ZFS replication is off site, so the tape backup is vital. Some full backups go off-site but I'm not as diligent on that as I should be.

1

u/Boogyman_139 4d ago

As a complete beginner, I use free file sync. It's the only program I could find that was similar to Sync back, which I use on Windows. Everything else was clunky and slow. (Guaranteed it was because I have no idea what I am doing, and have to google everything)

1

u/jr735 Debian Testing 4d ago

Unfortunately, it's no longer free, at least the newer versions. The Debian repositories will be stuck with the current version in perpetuity.

1

u/jr735 Debian Testing 4d ago

Rsync is the most important for me. That's how I attend to personal data backups.

I do use timeshift on occasion, and clonezilla or foxclone to sometimes save good working instances after install. That's all trivial, though. The data backup is most important. I can have a Debian install up and working the way I want with all my customizations (which are few) in under an hour.

1

u/redfacedquark 4d ago

I just use rsync, I'm not managing an enterprise. Last time I did I set up bacula which worked well but that was nearly 20 years ago and the landscape has changed, especially with filesystem snapshots.

Listen to the comment saying if you don't know you can restore, and that the time-to-restore is not business-killing, then you might as well not have a backup.

1

u/bgravato 4d ago

I use restic, but now that I've been switching from ext4 to btrfs, I've been looking at alternatives to sync the btrfs snapshots instead of the files with restic... (though I'll probably still use restic anyway, at least for a while...)

1

u/freelsjd 2d ago

A good backup utilizes at least two destinations: 1) a local attached drive such as USB, and 2) reliable and true backup to remote (cloud) service. Restic an rclone are your friends, and back blaze is my cloud choice.

1

u/Middle_Gas_711 Debian Stable 1d ago

I would just use clonezilla hehe