rsync-sidekick icon indicating copy to clipboard operation
rsync-sidekick copied to clipboard

Support for remote locations (via ssh)

Open apirogov opened this issue 3 years ago • 11 comments

I would love to just use rsync-sidekick, but apparently this is restricted for cases where source and destination directory are local.

It would be extremely useful if it would support remote source or target. In the meantime, I created a little script (tailored to my needs) that does what I want (if I knew Go or would be interested in learning it, I would of course have just contributed to rsync-sidekick).

If someone is looking for something like that but with remote support, see here for some infos and here for the gist and adapt it to your needs.

I am currently not interested in working it out more than that, so would be happy if rsync-sidekick would subsume all the features so I can abandon my weekend project script for good.

apirogov avatar Sep 07 '22 18:09 apirogov

I implemented github.com/helinwang/sync_mv that supports remote syncing.

helinwang avatar Dec 27 '22 20:12 helinwang

I highly recommend switching to BorgBackup, which is a production-ready tool built for remote syncing with minimal duplication.

alexandervlpl avatar Apr 17 '23 03:04 alexandervlpl

@alexandervlpl Correct me if I'm wrong, but I've looked at the docs a bit and I don't see any way to sync directory structures between two machines using Borg Backup. Is this possible, if one disables de-duplication, encryption, compression, etc. to actually replicate files on the target device which can be accessed outside the backup program?

michael-ts avatar Apr 20 '23 01:04 michael-ts

As far as I know, you can backup a directory structure to a backup repository located on another machine. So no direct sync to a directory structure.

However, you can restore or mount the backup repository afterward. This would allow to finally recreate the same directory structure on the other machine. But this is indeed not the same as directly syncing two directory structures.

PS: I actually prefer Kopia over Borg as a backup solution. I find it more intuitive and maybe it is a little bit more modern. Though, it basically has a very similar command line interface.

PS2: For direct remote syncing two directory structures with deduplication, there is still syncthing. But with this you really need to do some set up steps and it is not just like a simple rsync command via ssh.

frederikb96 avatar Apr 20 '23 06:04 frederikb96

@michael-ts if you need a usable mirror on the other side, Borg (or Kopia?) may work but it won't be ideal.

Yes, you'll need to mount the backup on the second machine. AFAIK this is read-only. Also since this will be a FUSE filesystem and there's all this deduplication magic happening in the background, performance will probably be slow. You do want the deduplication though, that's what prevents all the extra useless copying we want to avoid.

alexandervlpl avatar Apr 20 '23 13:04 alexandervlpl

Did anyone try syncthing yet for such a usecase?

Using a backup tool instead of rsync seems like a "misuse" of tools. Even though it might work, goals are different.

maxammann avatar Sep 25 '23 12:09 maxammann

Syncthing to me is more of a "Dropbox, but decentral and open source" use-case and in fact, I do not want it to happen continuously, because sometimes I can mess up my primary copy and want to use the "backup" - if you don't keep a "history" on the backup side, continuous sync sounds not like the right solution.

apirogov avatar Sep 25 '23 14:09 apirogov

I thought synching might have a one-sync mode which only runs one. But that does not exist.

maxammann avatar Sep 25 '23 21:09 maxammann

You can mount remote file system using sshfs and then use rsync-sidekick like normal on local file system.

MOJNICK avatar Apr 23 '24 23:04 MOJNICK

@MOJNICK Technically yes, but it's worth noting that sshfs is super slow even with simple file operations in ideal conditions on a LAN. Something like rsync-sidekick will probably be unusable unless you're working with a very small number of files.

alexandervlpl avatar Apr 24 '24 03:04 alexandervlpl

@alexandervlpl That's true.

m-manu avatar Apr 24 '24 17:04 m-manu