Skip to content

A one-way mirror sync mode option #11470

Description

@twojstaryzdomu

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

Activity

  1. added
    feature: transfers[WIP] Any uploading / downloading matters that aren't auto upload or sync specific
    on Oct 11, 2023
  2. changed the title [-]Feature request: add a one-way mirror sync mode option[/-] [+]A one-way mirror sync mode option[/+] on Oct 11, 2023
  3. addy419 commented on Nov 27, 2023

    @addy419

    I also have another use case for this. While I agree that backing up files is the primary feature, there are cases like syncing whatsapp images, where backing up only clutters space on the server. You usually what to keep the photos/videos sent to you on whatsapp, but then there are useless things on groups/screenshots/temporary files which as usually deleted in a few minutes. For such cases, an optional mirror feature would be perfect. It is possible to extend the current functionality by adding an option to sync deletions to achieve this, but I'm having trouble looking for this in the code. If someone is able to implement this, or can direct me, I'm willing to help.

  4. added and removed
    feature: transfers[WIP] Any uploading / downloading matters that aren't auto upload or sync specific
    on Nov 1, 2024
  5. AlexandrePereon commented on Nov 24, 2024

    @AlexandrePereon

    Any news about the issue?

  6. PhilLab commented on Sep 24, 2026

    @PhilLab
    Contributor

    It sounds like #17570 would solve this use case. Please leave a vote there (👍 ), if you request that feature.

  7. added
    needs infoWaiting for info from user(s). Issues with this label will auto-stale.
    on Sep 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementfeature: syncneeds infoWaiting for info from user(s). Issues with this label will auto-stale.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions