this post was submitted on 03 Oct 2025
550 points (97.1% liked)

Selfhosted

52161 readers
761 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)

top 50 comments
sorted by: hot top controversial new old
[–] mistermodal@lemmy.ml 1 points 8 minutes ago

Because it's not shiny and new? I think the simple stuff works great with the shiny stuff. Command line tools are great for weaving in NTFY pings to our fancy pocket communicators with all kinds of information.

[–] state_electrician@discuss.tchncs.de 34 points 6 days ago (5 children)

Why videos? I feel like an old man yelling at clouds every time something that sounds interesting is presented in a fucking video. Videos are so damn awful. They take time, I need audio and I can't copy&paste. Why have they become the default for things that should've been a blog post?

[–] Wawe@lemmy.world 15 points 6 days ago* (last edited 6 days ago)

They linked blog post with the video: https://vkc.sh/everyday-rsync/

[–] czardestructo@lemmy.world 12 points 6 days ago

Thank you for putting into words what ive subconsciously been thinking for years. Every search result prioritizes videos at the top and I'm still annoyed every time. Or even worst I have to hunt through a 10 minute video for the 30 seconds of info I needed. Stoohhhhpppp internet of new! Make it good again!

[–] vga@sopuli.xyz 9 points 6 days ago (1 children)

Blogs can have ads.

[–] kchr@lemmy.sdf.org 5 points 6 days ago

Hear hear. Knowledge should be communicated in an easily shareable way that can also be archived as easily, in contrast to a video requiring hundreds of MB:s.

[–] northernlights@lemmy.today 3 points 6 days ago (1 children)

Especially for a command line tool

[–] Matthew@midwest.social 1 points 4 days ago
[–] 1984@lemmy.today 7 points 6 days ago* (last edited 6 days ago) (1 children)

I never thought of it as slow. More like very reliable. I dont need my data to move fast, I need it to be copied with 100% reliability.

And not waste time copying duplicate data. And for the typical home user, it's probably mo slower than other options.

[–] MangoPenguin@lemmy.blahaj.zone 4 points 6 days ago (3 children)

Surely restic or borg would be better for backups?

Rsync can send files and not delete stuff, but there's no versioning or retention settings.

[–] srjd7cpsmjvja3cyae@lemmy.ml 1 points 11 minutes ago

Duplicity also works really well for backups and you can encrypt them with your own openpgp key.

https://duplicity.gitlab.io/

[–] chronicledmonocle@lemmy.world 2 points 6 days ago (1 children)

If you add --delete-before, it absolutely can delete stuff.

Yeah but then it's not really a good backup!

[–] sugar_in_your_tea@sh.itjust.works -2 points 6 days ago* (last edited 6 days ago) (1 children)

For versioning/retention, just use snapshots in whatever filesystem you're using (you are using a proper filesystem like ZFS or BTRFS, right?).

[–] MangoPenguin@lemmy.blahaj.zone 2 points 5 days ago (1 children)

How does that get sent over rsync though? Wouldn't you need snapshots on the remote destination server?

Why not just use a backup utility instead?

[–] sugar_in_your_tea@sh.itjust.works 2 points 5 days ago (1 children)

Yes, async copies files to the remote server, the remote server takes regular snapshots.

Why not just use a backup utility instead?

What is that utility providing that snapshots + rsync doesn't. If rsync + snapshots is sufficient, why overcomplicate it with a backup utility?

[–] MangoPenguin@lemmy.blahaj.zone 2 points 5 days ago (1 children)

The main things that come to mind are you have to test/monitor 2 seperate actions instead of 1, and restores of single files could be more difficult since you need to login to the backup server, restore the file from a snapshot, then also copy that file back to your PC.

My point is, how often do you actually need to restore from backup? If it's frequent, consider a dedicated tool for whatever that thing is. If it's infrequent, it'll probably easier to just learn how to do it every five years or whatever.

If you like borg/restic/etc, by all means, use it.

My point is that most people probably don't need it. Snapshots are something you set up once, and you should probably use them even if you're using something like borg for any files that aren't covered (e.g. config files on the server). Rsync is also something you set up once, and checking it is the same as any other service.

[–] vga@sopuli.xyz 4 points 6 days ago* (last edited 6 days ago) (2 children)

It's not bad if you don't need historical backups. I kinda think I do, so I use https://github.com/rustic-rs/rustic becase rust

Restic (https://github.com/restic/restic) is probably a better choice if you're not a rust-freak like me.

[–] harambe69@lemmy.dbzer0.com 4 points 6 days ago

Rustic scares me. I will 100% forget what tool I used to backup after 5 years and be unable to recover my files.

[–] WolfLink@sh.itjust.works 3 points 6 days ago (1 children)

I use rsync + ZFS for backups which includes historical backups

Yup, just configure a snapshot policy and you can recover deleted and modified files going back as long as you choose. And it is probably more space efficient than both/restic too.

[–] Wispy2891@lemmy.world 1 points 6 days ago (1 children)

I tried to use it via tailscale but it disconnects very easily - is to be expected?

[–] offspec@lemmy.world 3 points 6 days ago (1 children)

I would not expect rsync to have frequent disconnects, no.

[–] Wispy2891@lemmy.world 1 points 6 days ago

If I connect to the same server via my own VPN I don't have the disconnections, so I'm thinking it's tailscale cutting connections after too much traffic. But connecting via tailscale is so much more convenient 😢

[–] victorz@lemmy.world -1 points 6 days ago (1 children)

But if you're working with Linux you're going to need to know it.

Nope. I never have needed to know it. I only ever used it because I was either curious to know how to use it or because it was more convenient than other solutions. But scp is basically just as convenient.

[–] sugar_in_your_tea@sh.itjust.works 2 points 6 days ago (1 children)

It doesn't do diffs, so it's really bad if there's a lot of duplicate data.

[–] victorz@lemmy.world 1 points 5 days ago* (last edited 5 days ago) (1 children)

If you want to use it for backups, there are other solutions, so you still don't need to use it or know it. You can use something else. That's my only point. 🤷‍♂️

And "really bad" is all relative. If you are only backing up your home drive with documents or whatever, copying a few unnecessary gigabytes over a LAN connection isn't too bad at all. But scp isn't what you should be using for backups anyway. I only used rsync for file transfer...

[–] sugar_in_your_tea@sh.itjust.works 1 points 5 days ago (1 children)

I use rsync for all kinda of things:

  • deploying static files to a public webserver (blog or whatever)
  • backups - scheduled systems/cron task w/ SSH key
  • copying stuff from a USB drive

I only really use scp if the system doesn't already have rsync.

[–] victorz@lemmy.world 1 points 5 days ago (1 children)

Alright. But you don't need to know rsync. That's my only point. 👍👍

[–] sugar_in_your_tea@sh.itjust.works 1 points 5 days ago (1 children)

Sure, but you should probably be aware of what it is and what it does. It's incredibly common and will be referenced in a ton of documentation for Linux server stuff.

[–] victorz@lemmy.world 1 points 5 days ago (1 children)

You won't need to unless you run a server in that case. 👍 But the only condition here was "working with Linux".

Like I said, I've been using Linux at home and for work for over a decade, maybe 15+ years, never once did I need to use rsync or know what it is.

That being said, it was convenient when I used it, but never did I need it.

This is the self-hosted community, so that's the context I was assuming.

[–] NuXCOM_90Percent@lemmy.zip 72 points 1 week ago (4 children)

I would generally argue that rsync is not a backup solution. But it is one of the best transfer/archiving solutions.

Yes, it is INCREDIBLY powerful and is often 90% of what people actually want/need. But to be an actual backup solution you still need infrastructure around that. Bare minimum is a crontab. But if you are actually backing something up (not just copying it to a local directory) then you need some logging/retry logic on top of that.

At which point you are building your own borg, as it were. Which, to be clear, is a great thing to do. But... backups are incredibly important and it is very much important to understand what a backup actually needs to be.

[–] tal@olio.cafe 25 points 1 week ago* (last edited 1 week ago) (8 children)

I would generally argue that rsync is not a backup solution.

Yeah, if you want to use rsync specifically for backups, you're probably better-off using something like rdiff-backup, which makes use of rsync to generate backups and store them efficiently, and drive it from something like backupninja, which will run the task periodically and notify you if it fails.

rsync: one-way synchronization

unison: bidirectional synchronization

git: synchronization of text files with good interactive merging.

rdiff-backup: rsync-based backups. I used to use this and moved to restic, as the backupninja target for rdiff-backup has kind of fallen into disrepair.

That doesn't mean "don't use rsync". I mean, rsync's a fine tool. It's just...not really a backup program on its own.

load more comments (8 replies)
load more comments (3 replies)
[–] mesamunefire@piefed.social 50 points 1 week ago (9 children)

Ive personally used rsync for backups for about....15 years or so? Its worked out great. An awesome video going over all the basics and what you can do with it.

[–] Eldritch@piefed.world 22 points 1 week ago (3 children)

And I generally enjoy Veronica's presentation. Knowledgable and simple.

load more comments (3 replies)
load more comments (8 replies)
[–] atk007@lemmy.world 23 points 1 week ago (5 children)

Rsnapshot. It uses rsync, but provides snapshot management and multiple backup versioning.

load more comments (5 replies)
load more comments
view more: next ›