Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for remote locations (via ssh) #7

Open
apirogov opened this issue Sep 7, 2022 · 11 comments
Open

Support for remote locations (via ssh) #7

apirogov opened this issue Sep 7, 2022 · 11 comments
Assignees
Labels
enhancement New feature or request

Comments

@apirogov
Copy link

apirogov commented Sep 7, 2022

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.

@m-manu m-manu self-assigned this Sep 9, 2022
@m-manu m-manu added the enhancement New feature or request label Dec 11, 2022
@helinwang
Copy link

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

@alexandervlpl
Copy link

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

@michael-ts
Copy link

@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?

@frederikb96
Copy link

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.

@alexandervlpl
Copy link

alexandervlpl commented Apr 20, 2023

@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.

@maxammann
Copy link

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.

@apirogov
Copy link
Author

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.

@maxammann
Copy link

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

@MOJNICK
Copy link

MOJNICK commented Apr 23, 2024

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

@alexandervlpl
Copy link

@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.

@m-manu
Copy link
Owner

m-manu commented Apr 24, 2024

@alexandervlpl That's true.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

8 participants