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

rclone Bisync support #17

Open
2 of 3 tasks
jthvai opened this issue Jul 28, 2022 · 11 comments
Open
2 of 3 tasks

rclone Bisync support #17

jthvai opened this issue Jul 28, 2022 · 11 comments
Assignees
Labels
enhancement New feature or request

Comments

@jthvai
Copy link

jthvai commented Jul 28, 2022

Pre-Submission checklist

  • There is no existing issue that already asks for this feature.
  • The feature already exists in rclone (on your PC or in Termux)
  • I am prepared to help make this feature - I know nothing of Android development, so I don't feel entirely capable of helping, but I would be willing to do docs or things you feel I could assist with

What version of RCX extRact are you using (About -> App version)?

2.0.2-dev

What problem are you trying to solve?

Avoid running two trigger-based tasks with one-directional Sync, which is not recommended by ncw, rclone dev. Also in the same thread, a setup with two trigger-based one-directional Copy tasks does not allow for deleting files.

What should RCX be able to do differently to help with this problem?

Support rclone's native bisync, available as of rclone v1.58.0. This has been briefly brought up in an rcx issue.

@newhinton newhinton added the enhancement New feature or request label Jul 28, 2022
@newhinton
Copy link
Owner

I have read about it, but did not get around to play with it. It is definitively on my roadmap!

@newhinton
Copy link
Owner

I have investigated bisync. It seems it is rather easy to integrate, and it should not be a problem to use it on devices with android 7 and above.

Due to rclone/rclone#2446, it will probably be impossible to make it work, but since those versions are not supported anyway this wont be a problem.

@newhinton newhinton self-assigned this Jul 29, 2022
@newhinton
Copy link
Owner

This will be delayed. Bisync required two different types of commands, depending on the state of rclone, This requires a lot of error-catching and checking, something that is currently not easily possible due to the way this app is structured.

See https://rclone.org/bisync/#error-handling

@newhinton newhinton pinned this issue Jul 31, 2022
@newhinton newhinton unpinned this issue Dec 7, 2022
@wkornewald
Copy link

Do you have any update on this feature request? Bidirectional sync is basically the only sane way to keep data in sync between multiple devices (e.g. the photo library shared between phone and laptop via NAS). Unidirectional sync is only useful for non-shared backups, but that case is handled much better with incremental backups that keep a file history (like Restic or Borg or Time Machine etc.).

@thecoffeebin
Copy link

Hi, just tried out RoundSync and it's awesome! Thinking to replace AutoSync or FolderSync but sadly there is no two-way sync (or Bisync) in RS which is important to share files between devices. Hopefully you can consider to implement this.

Thanks.

@Asmageddon
Copy link

+1 Most usecases other than backups strictly require bidirectional sync unless one is alright with losing their data. Was really hoping this app would support it since rsync does, nowadays, but alas.

@newhinton
Copy link
Owner

Bisync is not going to happen anytime soon. I am the only dev, and this requires a lot of changes to be made to the core parts of this app. I simply dont have the time (and, to be honest, the need for bisync) to make such changes, not while other issues are more pressing.

PR's are welcome as always, but for the forseeable future i am not going to spend time on this.

@jonaslomp
Copy link

jonaslomp commented Apr 20, 2024

Hello, I just looked into it because i want this, In app/src/main/java/ca/pkay/rcloneexplorer/Items/SyncDirectionObject.java

 // The first time a bidirectional sync is used, it hast to use --resync. https://rclone.org/bisync/
public static final int SYNC_BIDIRECTIONAL_INITIAL = 5;
public static final int SYNC_BIDIRECTIONAL = 6;

-resync should not be done automatic, it should be something the User needs to Trigger and confirm that files in Target will be overwriten, also because of this BiSync needs direction, so the user can decide what gets overwriten. I would do

public static final int SYNC_BIDIRECTIONAL_LOCAL_TO_REMOTE= 5;
public static final int SYNC_BIDIRECTIONAL_REMOTE_TO_LOCAL = 6;

And then threat bisync like a normal sync with a boolean doResync as last Argument of the Sync function in app/src/main/java/ca/pkay/rcloneexplorer/Rclone.java (like with useMd5Sum)

When bisync fails so it needs a -resync, the user should do it based on the LOGS or maybe as a hint a notification, on the next time the Task tries to run.

@aloni636
Copy link

aloni636 commented May 8, 2024

Hi,
I also want this feature.
@jonaslomp, is there any way I can collaborate and help pushing this forward?

@jonaslomp
Copy link

jonaslomp commented May 9, 2024

@aloni636 I'm not sure how much sense it makes to do it, because i don't know if @newhinton would accept the PR after #258.

On the other hand, one could overhaul the sync() function to make it more flexible, for example give remotes the option to have arguments that are always taken when the remote is used. There is already a version without useMD5sum doing this for any argument that might be needed is not really an option...

@Newdea
Copy link

Newdea commented Aug 9, 2024

+1, I also want this feature.

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