UpBack: two way synchronization utility based on rclone

Available from https://github.com/DavideRossi/upback
Very early alpha software. I have to admit I would be amazed if somebody is actually able to run it, that’s my first take on Python (and is probably going to be the last, distributing a simple program is a mess).
I hope ncw does not consider this unsolicited advertisement…

Very interesting! You might like to add it to the rclone wiki in the 3rd party apps section.

What I’d really like is for someone to add a two way sync command to rclone. I think it has all the primitives necessary it just needs someone who understands what two-way sync entails!

1 Like

Well, assuming I got it right, the basic algorithm is quite straightforward. You keep a copy for the last seen status of the remote, then you start comparing both local and current remote with it. Mix the various cases and what to do is straightforward. You can give a look here: https://github.com/DavideRossi/upback/blob/master/upback/upback.py#L96
I could very well rewrite it in Go and merge it with rclone, I guess that it mostly boils down to design decisions. For example: when conflicts are detected UpBack reports them and allows the user to edit a conflicts file to give instructions on how to deal with each conflict. Once the file is ready UpBack can be resumed. Would that be ok for rclone?

:smile:

I don’t have a strong opinion.

It would be nice if the two-way sync could be put on a crontab.

Does the conflicts file let UpBack carry on just ignoring those conflicted files until the situation is resolved? That seems like it would work well.

We could always make a resolve conflicts command which guided the user through fixing them asyncronously to the sync.

Sounds like we need three flags

--local-wins-conflict
--remote-wins-conflict
--report-and-skip-conflicts (default)

1 Like

Yep, seems reasonable. I’m not sure about the last one, if it’s the default behavior you would not need a switch for it. Anyway, waiting for the guys @ visual studio code to fix a bug with python debugging before resuming development.

Sounds like we need three flags

–local-wins-conflict
–remote-wins-conflict
–report-and-skip-conflicts (default)

A 4th option, which many other similar applications take, is:
– make some “intelligent” decision about who the winner is, and rename the loser to show it as a conflicting file.

What I would like to see is a two-way sync for is simply to have the last updated version between two devices win. So I can edit a file on my phone and then run rclone timesync or whatever on my main machine and it would pick the phone-edited version.

If there is some hidden feature on rclone that does that, please share :slight_smile:. Else, I’ll make a PR