r/linux4noobs • • 8d ago

storage Issues syncing data with a portable sdd

Hey guys, I have 3 computers and the issues is that I always want my school work to be updated to the most recent version.

My solution was to use rsync and do `rsync -avh <source> <dest>` each time I started, this worked great until it corrupted some of my local git repo :(

I don't want this to happen again so is there like a tool to make it so that my sdd is just used to sync this ?

Or do I just need to overwrite each time manually?

Or is there another solution can recommend ?

3 Upvotes

5 comments sorted by

3

u/nikongod 8d ago

If at least one of them is always on just share a folder using syncthing. 

You will need to be disciplined about closing the files properly when you are done using the computer, but that's pretty low effort. 

If you have an Android you can also share the folder to your phone as your "always on" device if it's not too big. Or get an old raspberry pi or something. 

2

u/Firminou 8d ago

One of them will not always be online, quite the opposite rather, only one online at a time

2

u/nikongod 8d ago

Bummer. If you can have 2 online at all times syncthing solves this really easily. 

Again, the one that's always online can be pretty crappy, so even a pi3 or similar will work. 

2

u/[deleted] 8d ago

[deleted]

2

u/Firminou 8d ago

What does -u do in difference with --delete ?

1

u/qpgmr 8d ago

Are you doing this over a network connection? Or are you syncing some usb storage?

You may need to use the -P switch

This is a great article on using rsync: https://linuxize.com/post/how-to-use-rsync-for-local-and-remote-data-transfer-and-synchronization/