rsync command for mirroring drives
2026-05-22 00:29 UTC
Replies (6)
-
@Magister@lemmy.world 2026-05-22 01:23
I do about the same, something like rsync -av --delete
-
@hades@feddit.uk 2026-05-22 06:20
-z might be pointless since you’re transferring files locally.
-
@BCsven@lemmy.ca 2026-05-22 04:24
Grsync makes this easier :)
-
@IsoKiero@sopuli.xyz 2026-05-22 09:49
There’s also –delete-before which might help if your destination is tight on available space. And, as usual with ‘traditional’ tools, man-page is pretty good, there’s a ton of parameters which might be helpful. And, as @hades@feddit.uk already mentioned, compression (-z) may actually hurt performance if you have a lot of bandwidth or if you’re copying over already compressed data like JPGs.
-
@Infernal_pizza@lemmy.dbzer0.com 2026-05-22 12:38
I usually use rsync -azP --delete but I’m not sure if that’s the best option.
-
@limelight79@lemmy.world 2026-05-23 16:32
You have your answers, but I just want to note that what I do is run rsync from cron nightly, without the delete option. Basically this reduces the chances of losing something by accidentally deleting it on the primary drive. Every few weeks/months, I run the rsync command with the delete option to clean up. It’s not a perfect backup by any means, especially since I could erroneously delete something right before that second rsync command and lose it for good. But it does provide a measure of safety.