this post was submitted on 03 Oct 2025
406 points (97.0% liked)

Selfhosted

51975 readers
2311 users here now

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.

Rules:

  1. Be civil: we're here to support and learn from one another. Insults won't be tolerated. Flame wars are frowned upon.

  2. No spam posting.

  3. Posts have to be centered around self-hosting. There are other communities for discussing hardware or home computing. If it's not obvious why your post topic revolves around selfhosting, please include details to make it clear.

  4. Don't duplicate the full text of your blog or github here. Just post the link for folks to click.

  5. Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).

  6. No trolling.

Resources:

Any issues on the community? Report it using the report flag.

Questions? DM the mods!

founded 2 years ago
MODERATORS
 

You might not even like rsync. Yeah it's old. Yeah it's slow. But if you're working with Linux you're going to need to know it.

In this video I walk through my favorite everyday flags for rsync.

Support the channel:
https://patreon.com/VeronicaExplains
https://ko-fi.com/VeronicaExplains
https://thestopbits.bandcamp.com/

Here's a companion blog post, where I cover a bit more detail: https://vkc.sh/everyday-rsync

Also, @BreadOnPenguins made an awesome rsync video and you should check it out: https://www.youtube.com/watch?v=eifQI5uD6VQ

Lastly, I left out all of the ssh setup stuff because I made a video about that and the blog post goes into a smidge more detail. If you want to see a video covering the basics of using SSH, I made one a few years ago and it's still pretty good: https://www.youtube.com/watch?v=3FKsdbjzBcc

Chapters:
1:18 Invoking rsync
4:05 The --delete flag for rsync
5:30 Compression flag: -z
6:02 Using tmux and rsync together
6:30 but Veronica... why not use (insert shiny object here)

you are viewing a single comment's thread
view the rest of the comments
[–] non_burglar@lemmy.world 0 points 19 hours ago (1 children)

I use rsync and a pruning script in crontab on my NFS mounts. I've tested it numerous times breaking containers and restoring them from backup. It works great for me at home because I don't need anything older than 4 monthly, 4 weekly, and 7 daily backups.

However, in my job I prefer something like bacula. The extra features and granularity of restore options makes a world of difference when someone calls because they deleted prod files.

[–] tal@olio.cafe 1 points 42 minutes ago* (last edited 41 minutes ago)

I don't know if there's a term for them, but Bacula (and I think AMANDA might fall into this camp, but I haven't looked at it in ages) are oriented more towards..."institutional" backup. Like, there's a dedicated backup server, maybe dedicated offline media like tapes, the backup server needs to drive the backup, etc).

There are some things that rsnapshot, rdiff-backup, duplicity, and so forth won't do.

  • At least some of them (rdiff-backup, for one) won't dedup files with different names. If a file is unchanged, it won't use extra storage, but it won't identify different identical files at different locations. This usually isn't all that important for a single host, other than maybe if you rename files, but if you're backing up many different hosts, as in an institutional setting, they likely files in common. They aren't intended to back up multiple hosts to a single, shared repository.

  • Pull-only. I think that it might be possible to run some of the above three in "pull" mode, where the backup server connects and gets the backup, but where they don't have the ability to write to the backup server. This may be desirable if you're concerned about a host being compromised, but not the backup server, since it means that an attacker can't go dick with your backups. Think of those cybercriminals who encrypt data at a company and wipe other copies and then demand a ransom for an unlock key. But the "institutional" backup systems are going to be aimed at having the backup server drive all this, and have the backup server have access to log into the individual hosts and pull the backups over.

  • Dedup for non-identical files. Note that restic can do this. While files might not be identical, they might share some common elements, and one might want to try to take advantage of that in backup storage.

  • rdiff-backup and rsnapshot don't do encryption (though duplicity does). If one intends to use storage not under one's physical control (e.g. "cloud backup"), this might be a concern.

  • No "full" backups. Some backup programs follow a scheme where one periodically does a backup that stores a full copy of the data, and then stores "incremental" backups from the last full backup. All rsnapshot, rdiff-backup, and duplicity are always-incremental, and are aimed at storing their backups on a single destination filesystem. A split between "full" and "incremental" is probably something you want if you're using, say, tape storage and having backups that span multiple tapes, since it controls how many pieces of media you have to dig up to perform a restore.

  • I don't know how Bacula or AMANDA handle it, if at all, but if you have a DBMS like PostgreSQL or MySQL or the like, it may be constantly receiving writes. This means that you can't get an atomic snapshot of the database, which is critical if you want to be reliably backing up the storage. I don't know what the convention is here, but I'd guess either using filesystem-level atomic snapshot support (e.g. btrfs) or requiring the backup system to be aware of the DBMS and instructing it to suspend modification while it does the backup. rsnapshot, rdiff-backup, and duplicity aren't going to do anything like that.

I'd agree that using the more-heavyweight, "institutional" backup programs can make sense for some use cases, like if you're backing up many workstations or something.