Skip to content

[Bug]: Sync overwrote new versions with old versions #8171

@jedenastka

Description

@jedenastka

⚠️ Before submitting, please verify the following: ⚠️

Bug description

I have an Nextcloud server which has not been online for a week or so due to an issue with it's storage. During that time, I have done some work on files that are normally synced to the server - since the server has been offline, those were not synced.

After I brought the server back online, restored a backup and did a sync, I was surprised to find local files which I modified during that week replaced with their old copies from the remote, rather than the other way around. Newly created local files were detected and synced to remote properly. This caused me to suffer minor data loss.

I have ran occ files:scan and occ files:cleanup after restoring from backup which I don't know if changed anything.

nextcloud.log: nextcloud_censored.log.gz
Debug archive: client_censored.zip

Steps to reproduce

  1. Sync some files with your Nextcloud server
  2. Break your Nextcloud server
  3. Do modifications to the synced files
  4. Wait a week
  5. Cause additional unknown factors?
  6. Fix your Nextcloud server and restore data from backup (sudo rsync -avhhhAXUH --info=progress2 --partial /path/to/backup/nextcloud/data/ /path/to/nextcloud/data is what I did)
  7. Run occ files:scan and occ files:cleanup
  8. Perform a sync
  9. Local files are reverted to their old remote versions

Expected behavior

New versions of the local files are uploaded to remote. If there are any issues/it's not possible to determine which version is the newer one, ask the user.

Which files are affected by this bug

sync/wydatki.kmy, notatki/belweder_interfejs.txt

Operating system

Linux

Which version of the operating system you are running.

Debian GNU/Linux Unstable

Package

Distro package manager

Nextcloud Server version

31.0.3, 31.0.2 at the moment of sync

Nextcloud Desktop Client version

3.16.2-1

Is this bug present after an update or on a fresh install?

Updated to a major version (ex. 3.3.6 to 3.4.0)

Are you using the Nextcloud Server Encryption module?

Encryption is Disabled

Are you using an external user-backend?

  • Default internal user-backend
  • LDAP/ Active Directory
  • SSO - SAML
  • Other

Nextcloud Server logs

Additional info

Due to privacy (Microsoft, AI scrapers, stalkers etc.) concerns, I have removed sync databases with potentially sensitive file names from the client and censored the logs. If there is a need, I can share more privately with contributors (see my website for contact options, let me know here before you contact me).

Metadata

Metadata

Assignees

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions