Skip to content
This repository has been archived by the owner on Jul 5, 2024. It is now read-only.

One-way sync #17

Open
derrix060 opened this issue Aug 30, 2018 · 7 comments
Open

One-way sync #17

derrix060 opened this issue Aug 30, 2018 · 7 comments
Assignees

Comments

@derrix060
Copy link
Owner

Looking into the most reactions issues on parent project (xybu/onedrived-dev), there are a lot of people asking for one-way sync on both directions server to client and client to server.

This issue is to investigate this and organize ideas about how to structure the required changes.

@derrix060
Copy link
Owner Author

derrix060 commented Sep 13, 2018

I'm planning to store this configuration in the driver. So will be possible to have the same "drive" with 3 different configurations: multi-way sync (default), server-to-host (download only), host-to-server (upload-only). My first thought was to store the configuration on the account, but then I lose the flexibility a little bit.

The configuration will be stored on the config.json (default to onedrived_config_v2.json) and if someone changes there will have some problems...

@derrix060
Copy link
Owner Author

derrix060 commented Sep 13, 2018

Space for some questions:

On the server-to-host (download only), if some file gets moved/renamed/deleted on the server, should this be sync too?

On the host-to-server (upload only), if some local file gets moved/renamed/deleted, should this be sync?

I don't think both questions need to be fixed. I need to find a way to let the drivers be flexible regarding its configuration. Maybe for some use cases make sense only download new files, and not delete if was deleted on the server, in another use case I would have to delete too.

One possible approach is on when configuring the driver ask these things:

For upload:

Which operations do you want to enable for the uploads? (from local to OneDrive)

  1. Delete only
  2. Move/Rename only
  3. Add only
  4. Add + Move/Rename
  5. Delete + Move/Rename
  6. Deletions + Move/Rename
  7. All operations (default)

For download:

Which operations do you want to enable for the downloads? (from OneDrive to local)

  1. Delete only
  2. Move/Rename only
  3. Add only
  4. Add + Move/Rename
  5. Delete + Move/Rename
  6. Deletions + Move/Rename
  7. All operations (default)

And ask a confirmation if not select the default.

@GeorgLippold
Copy link

GeorgLippold commented Sep 19, 2018

This sounds like a really useful feature. I am most intrested in the "Add only" option for upload at this point in time.
It would be really useful if this feature could be enabled on a per-directory basis. E.g. if you have a Backup folder, you may just want to upload new backups to that folder and then delete the local copy. It might be even better, if you can just point onedrived at a local directory, and it automatically uploads all files into a target directory.
My dream would be to enable functionality that lets this work with duplicity without any large space consumed on the local filesystem, similar to acd_cli.

@derrix060
Copy link
Owner Author

@GeorgLippold thank you for the feedback. I'm working on it in this branch. enable it per-directory looks a little bit difficult to do in my opinion, mostly because at the first time that you assign to sync, the framework have no idea what folders the person has, so that's why I was thinking to do this per DRIVE.

@modelmat
Copy link
Collaborator

modelmat commented Oct 1, 2018

image
I'm confused with what's this saying, is it this?

  1. delete all files not in onedrive
  2. ???
  3. add all files not on local from onedrive
    4,5,6 N/A

also if it's not covered by .3, downloading files not in cloud which are not on local (sorted by hash + modify time) and deleted any extra

@derrix060
Copy link
Owner Author

derrix060 commented Oct 1, 2018

@modelmat I changed the previous idea...

Please download this file, open www.draw.io and import it to see what I'm thinking to do.

Also check this function to see what are the possible configurations to sync from local to onedrive and this function to do the opposite direction.

Please feel free to change how I'm trying to explain the concept, because I'm not soo good with words haha.

@modelmat
Copy link
Collaborator

modelmat commented Oct 1, 2018

Yikes, I'll have a go at decrypting this.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants