datahoarder
Who are we?
We are digital librarians. Among us are represented the various reasons to keep data -- legal requirements, competitive requirements, uncertainty of permanence of cloud services, distaste for transmitting your data externally (e.g. government or corporate espionage), cultural and familial archivists, internet collapse preppers, and people who do it themselves so they're sure it's done right. Everyone has their reasons for curating the data they have decided to keep (either forever or For A Damn Long Time). Along the way we have sought out like-minded individuals to exchange strategies, war stories, and cautionary tales of failures.
We are one. We are legion. And we're trying really hard not to forget.
-- 5-4-3-2-1-bang from this thread
view the rest of the comments
Rsync will compare the contents of the source directory with the target directory. If it finds a match, it won't copy the files, if there's no match, it copies.
If your goal is to have 1:1 copies, you can use the --delete flag to remove extraneous files in the target directory that aren't in the source directory.
If you use the -a flag, it'll maintain all of your permissions.
You can literally rsync a linux installation from one machine to another. While the source machine is running. Pretty nuts.
This is super helpful, thanks!
One thing to note that I just learned!
If you rsync over a network, you need to be careful. While you might sude rsync -a to maintain file ownership on the sending side, the receiving side will not be a superuser and therefore will be unable to make files owned by other users.
If you add "--rsync-path "sudo rsync" in the ssh version of the command, it'll tell the receiving side to use sudo which will allow it to maintain file ownership when storing the files.
Good to know!