nextcloud / nextcloud/android

A one-way mirror sync mode option

Open
#11,470 2 comments 2 reactions 0 assignees View on GitHub
enhancement feature: sync
Dominant language
Kotlin
Stars
5.6k
Forks
2k
Avg merge
2d 18h
Merged PRs (30d)
92

Description

### Is your feature request related to a problem? Please describe.
Media files, such as photos or video, are often moved by the user between directories on the phone. If a user chooses to manage all their photos on the phone's default software, deleting or moving as needed, the nextcloud server directory will invariably become cluttered up with extraneous items and likely duplicates. If the user considers their phone the golden source for the data on the nextcloud server, a one-way mirror mode is needed.

The current modes can contribute to server-side clutter, as the user moves a files between directories, renames or deletes it, after it has already been sent to the server. Currently the following appears to be happening:
1. NC client uploads file 1.jpg.
2. User renames file 1.jpg to 1_new.jpg.
3. NC client uploads file 1_new.jpg.
4. NC server now contains 1.jpg & 1_new.jpg.

In the case above, 1.jpg is the extraneous file, taking up space remotely even though it has been removed (renamed to 1_new.jpg) locally.

### Describe the solution you'd like
Add a one-way mirror sync mode option. The mode assumes the local directory on the phone is the golden source for the files in the mirror-enabled directory on the server.

For any directory with the one-way mirror mode enabled this means:
1. Any modified / extraneous files present on the server, but missing from the client, are deleted. For all intents and purposes, any remote-only changes to the files in the remote directory with the one-way mirror enabled in the android client, are effectively discarded.
5. Any files available locally but missing from the nextcloud server are uploaded to the server (as done at present).

### Describe alternatives you've considered
Other WebDAV-based apps that allow one-way mirroring. Practically, it is difficult having to explain to lay users why they need to configure their cloud phone sync in two separate apps, one for their calendar & contacts and another or files.

### Additional context
Use case: keeping a mirrored copy of data on the phone can be tremendously useful when one loses their phone and needs to retrieve their last good copy as it was.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.