Nextcloud client on windows delete my files

Support intro

Sorry to hear you’re facing problems. :slightly_frowning_face:

The community help forum (help.nextcloud.com) is for home and non-enterprise users. Support is provided by other community members on a best effort / “as available” basis. All of those responding are volunteering their time to help you.

If you’re using Nextcloud in a business/critical setting, paid and SLA-based support services can be accessed via portal.nextcloud.com where Nextcloud engineers can help ensure your business keeps running smoothly.

Getting help

In order to help you as efficiently (and quickly!) as possible, please fill in as much of the below requested information as you can.

Before clicking submit: Please check if your query is already addressed via the following resources:

(Utilizing these existing resources is typically faster. It also helps reduce the load on our generous volunteers while elevating the signal to noise ratio of the forums otherwise arising from the same queries being posted repeatedly).

Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can. :heart:

The Basics

  • Nextcloud Server version (e.g., 29.x.x):
    • 31.0.0
  • Operating system and version (e.g., Ubuntu 24.04):
    • Ubuntu 24.04 kernel 6.11.11-1-pve
  • Web server and version (e.g, Apache 2.4.25):
    • Apache 2.4.63
  • Reverse proxy and version _(e.g. nginx 1.27.2)
    • Apache 2.4.63
  • PHP version (e.g, 8.3):
    • 8.3.17
  • Is this the first time you’ve seen this error? (Yes / No):
    • No
  • When did this problem seem to first start?
    • I don’t remember exactly, but it has existed for a long time. I previously ignored it by continuously inserting files until they uploaded properly.
  • Installation method (e.g. AlO, NCP, Bare Metal/Archive, etc.)
    • Bare Metal inside Proxmox LXC container
  • Are you using CloudfIare, mod_security, or similar? (Yes / No)
    • No

Summary of the issue you are facing:

This issue has been occurring for a long time, even across multiple updates of the Nextcloud server, Windows client, and Windows itself. The problem is that the Nextcloud client on Windows randomly deletes my local files inside the sync folder.

I say “randomly” because this affects a wide range of files, from very small (4KB) to very large (25GB), and applies to all file extensions. If I reinsert the deleted file, it does not get deleted again and uploads properly.

I first noticed the issue when my coworker reported that some files were missing (I am the only one with permission to delete files). Upon checking the sync folder, I found that certain files were absent. Initially, I suspected a local virus or that antivirus software might be interfering, but I found no evidence of this. The issue only occurs in the Nextcloud sync folder—no files are deleted outside of it.

There are no related logs on either the Nextcloud server or the client side. Additionally, this issue only happens on Windows clients. However, I have not observed whether other Windows clients are also affected, as I primarily use them for downloading or syncing, not uploading.

I am wondering whether this is a bug, a misconfiguration, or a hidden virus. I tried searching online but found no relevant results. What theories do you have? I can provide more information and logs if needed.

I only know about this behavior in a different way:
If an upgrade of the server failed and recovered the previous state from a backup, all files on the client will be set back to the server’s state and all changes are gone from local sync-folder.
Is it possible, that the same might be happened in your case?

Thanks for your response.

First, I want to clarify that this issue only occurs when I copy files into the sync folder. The files don’t disappear instantly, but over time, I notice something is wrong when certain files don’t appear on the server. There are no upload errors in the Nextcloud client (it shows a :white_check_mark: checkmark in the app), but when I recheck the sync folder, the files are missing.

Is there a way to monitor which application on Windows is deleting these files? I’d like to determine whether it’s the Nextcloud client, Windows Security, or another interfering process.

I wasn’t aware of any failed upgrades, but I’ll verify the integrity of all files, rescan everything, and see if that resolves the issue.

Thanks again!

You may find log information in nextcloud.log on the Nextcloud server and in your home folder on Windows computer in AppData\Roaming\Nextcloud\Nextcloud_sync.log

Are you sure, that the files become NOT deleted by annother program (possibly infected) or job by Task-Planer etc.?

I didn’t find anything indicating that the Nextcloud client deliberately deleted the files. The logs simply show 001 uploaded, then skipping to 003, as if 002 never existed in the first place—both in the Nextcloud client AppData logs and on the server.

I have also found a way to log activity for a specific folder to track which process or user is deleting files. I will continue monitoring this and will update if I find anything.

1 Like

Do the folders become synchronized by a second cloud-software (Google Drive, MS Ondrive etc.)?
In that case the other cloud software might be responsible for deletion.

just to rephrase your statement: the problem doesn’t affect files living in the folder for long time already. only if you add multiple files to the desktop client folder, some of the files are ignored/skipped during upload process. the client after some time reports successful sync.

If this is the case likely next sync will detect extra files on the client which don’t exist on the server and for this reason delete them (but you should see the process later in the client log). the hard part would be to detect which files where not uploaded and especially why and later deleted.

good idea: it could be while uploading the client can’t access the file for some reason e.g. due to AV scan: