desktop icon indicating copy to clipboard operation
desktop copied to clipboard

Subfolders of moved folders not synced

Open eboth opened this issue 7 years ago • 66 comments

Expected behaviour

When on your local Windows system, you move a folder into your Nextcloud folder within the same NTFS partition (did't test other file systems), the Nextcloud client should recursively synchronize all directory depths, i.e. all files and folders in all nested subfolders.

Actual behaviour

Moved folders are only synchronized up to the first level. This is the directory test as copied into the Nextcloud folder:

+-test/
  |
  +-level1/
  | |
  | +-level2/
  | |
  | +-level2.txt
  |
  +-level1.txt

This is the directory structure as copied by the Nextcloud client to the server:

+-test/
  |
  +-level1/
  |
  +-level1.txt

Steps to reproduce

  1. Create a directory test with at least one subfolder level1 outside your Nextcloud folder hierarchy, but on the same partition as your Nextcloud folder.
  2. Place content (files/folders) in level1.
  3. Move (not copy) test into your Nextcloud folder (Windows default C:\Users\username\Nextcloud).
  4. Wait for Nextcloud client to finish synchronization.
  5. Check contents of test on the server; confirm that the subfolder level1 is empty on the server.

Client configuration

2.5.1final (build 20181204)

Operating system: Windows 7 SP 1 (6.1)

File system: NTFS

Installation path of client: c:\Program Files (x86)\Nextcloud\

Server configuration

13.0.8.2

Logs

  1. Client logfile: https://gist.github.com/eboth/49d061cd66724e3e9dc699cfc4d1591f

While the log file was captured, the folder test_copied (with two levels of subdirectories as shown in the directory listing above) was copied to the Nextcloud folder, and the folter test_moved (same contents) was moved to the Nextcloud folder. The log seems to show that in the copied folder, all nodes were recognized correctly, while in the moved folder, the Nextcloud client never became aware of the nodes below level1.

eboth avatar Jan 06 '19 16:01 eboth

I can confirm that on Linux, script to create a test folder structure can be found here: https://gist.github.com/packi/1361912055bd03490bbb6a8906d9800e

I've initially created a bug for that on the owncloud client repos with more details as I didn't realize there was a separate repos for Nextcloud. https://github.com/owncloud/client/issues/6949

packi avatar Jan 11 '19 12:01 packi

Same here with linux client 2.5.1 ans server 15.0.4 ...

abysso2 avatar Feb 08 '19 19:02 abysso2

Same here, have the same issue. Main folder syncs, but subfolder did not.

dude2k5 avatar Feb 09 '19 09:02 dude2k5

Same problem here:

Client

  • Version: 2.5.1final (build 20181204)
  • OS: Ubuntu 16.04.5 LTS xenial
  • File system: ext4

Server

  • Versions: 14 and 15.0.4
  • OS: Ubuntu 16.04.5 LTS
  • Web Server: Nginx 1.15.8-8.6.0.1

Using PPA:

  • http://ppa.launchpad.net/nextcloud-devs/client/ubuntu

Packages version:

ii  libnextcloudsync0                                    2.5.1-20181204.111806~xenial1                                               amd64        Nextcloud sync library
ii  nextcloud-client                                     2.5.1-20181204.111806~xenial1                                               amd64        Nextcloud desktop sync client
ii  nextcloud-client-l10n                                2.5.1-20181204.111806~xenial1                                               all          Nextcloud client internatialization files

Log shows that _csync_detect_update only detects first level:

[_csync_detect_update 	Checking for rename based on inode # 11010575
[_csync_detect_update 	file: nextcloud/myclient/test, instruction: INSTRUCTION_NEW <<=
[_csync_detect_update 	Checking for rename based on inode # 11010705
[_csync_detect_update 	file: nextcloud/myclient/test/level1, instruction: INSTRUCTION_NEW <<=

estepix avatar Feb 15 '19 13:02 estepix

workaround: quit and restart the desktop client. Tested with the nextcloud-client Ubuntu ppa on Ubuntu 18.10.

hkiang01 avatar Feb 17 '19 20:02 hkiang01

I have read about that "workdaround" before and also tested and yes, it works, however restarting the client every time we add a few folders to nextcloud does not seem viable on a daily work basis

estepix avatar Feb 18 '19 12:02 estepix

@hkiang01, thanks! Confirmed on Windows. This makes the bug a lot less lethal as you can hope that sooner or later the files will end up on the server.

eboth avatar Feb 18 '19 18:02 eboth

Possible duplicate #1083?

SonRiab avatar Feb 25 '19 12:02 SonRiab

I can not reproduce this. All files from file structure https://github.com/nextcloud/desktop/issues/1000#issuecomment-453500896 are synchronized.

Client

* Version: 2.5.1

* OS: openSUSE Tumbleweed 20190225

* File system: ext4

Server

* Version: 14.0.7

* OS: Ubuntu 14.0.4 LTS

* Web Server: Apache 2.4.7

* PHP 7.2

bjoernv avatar Feb 27 '19 20:02 bjoernv

Same problem here on MacOS. I was trying to migrate files from Dropbox and noticed that any time I dragged a folder with lots of subfolders over, none of the subfolders had any contents synced.

Confirmed that quitting and re-launching the desktop client causes a complete sync.

aaronpk avatar Mar 03 '19 19:03 aaronpk

I can confirm this happening to me on Windows 10 with Nextcloud sync client 2.5.1final (build 20181204). Let's just say it made me quite vary of using Nextcloud to begin with.

dnv avatar Mar 16 '19 14:03 dnv

Confirming the same issue, 2.5.1final (build 20181204) on macOS 10.13.6. Restarted the client resolved it for the bugged sync, but any further additions of nested directories after the sync on start result in the same behavior and workaround.

driph avatar Mar 17 '19 23:03 driph

Confirming the inability of the client to sync all subfolders and files: Ubuntu 18.10, Version 2.5.1final (build 20181204). This is really a killerbug. Hopefully this will be fixed soon. We are trying to introduce Nextcloud to students of our school, but this is makes nextcloud a real no go.

It is indeed a showstopper, and shouldn't really be so difficult to fix. There are two additional workarounds (in addition to restarting the desktop client).

One is to add a file to the empty directory on the lowest level. E.g., if you do mkdir -p dir1/dir2/dir3/dir3 on the nextcloud client root directory, dir3 and dir4 will not be synced to the server, leaving dir2 without a subdirectory. If you do touch dir1/dir2/dir3/dir4/somefile, then all dirs will be synced, and somefile will exist on the server.

The second workaround is to use the command line client and do nextcloudcmd -s -u <nextcloud user> -p <nextcloud password> <nextcloud rootdir> <nextcloud url>

This does a complete re-sync.

I hope this helps anyone who suffers under the deficiencies of the desktop client.

wpoet avatar Mar 23 '19 21:03 wpoet

I just upgraded to the linux-client 2.5.2, still the same issue. I can not believe it. The server ist such an excellent piece of software, but the client really can not be trusted. That is a real showstopper - why does the owncloud client work as expected?

abysso2 avatar Apr 08 '19 14:04 abysso2

Spent a full day looking on Windows 10 machine what I made wrong (because I did not see expected files on the Server) and finally found this issue. I can confirm the problem (moving folder structure, sync not done 100%). This is a showstopper to move all our data from Seafile (which has a perfect working client) to Nextcloud. The Server Side of Nextcloud is quite nice - but the very most fundamental thing (sync files with the Desktop Client) can not be trusted all the times... I hope someone who is experienced with the Desktop Client can correct this.

adrianriedo avatar Apr 18 '19 10:04 adrianriedo

Also have this issue (with Linux desktops/laptops). Can occur when copying directories as well as moving.

Unfortunately Nextcloud is not fit for enterprise or business without a working and robust client. It makes me extremely nervous about the prospect of losing critical data.

ghost avatar Apr 18 '19 11:04 ghost

I just got bit by this bug, too.

$ nextcloud --version
Nextcloud version 2.5.2git
Using Qt 5.5.1, built against Qt 5.5.1
Using 'OpenSSL 1.0.2g  1 Mar 2016'

$ uname -a
Linux gemini 4.15.0-47-generic #50~16.04.1-Ubuntu SMP Fri Mar 15 16:06:21 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

$ mount | grep nvme
/dev/nvme0n1p2 on / type ext4 (rw,noatime,discard,errors=remount-ro,data=ordered)

A whole .git repo and its subdirectories, along with the contents of a lot of subdirectories of other files, all missing from server. Upon restarting the desktop client, the files synced to server (phew!).

This is really heartbreaking after spending a whole weekend creating this server and getting everything to work. How can I use Nextcloud to sync my source code if my projects all have subdirectories (and git repos!).

Edit: I triggered the bug by just moving a large nested directory structure from one location to ~/Nextcloud/ . Creating or touching individual files in nested subdirectories seems to sync just fine. It's just large file copies/moves that escape Nextcloud's gaze:

$ mkdir -p a/b/c
$ touch a/b/c/empty.txt
$ mv a ~/Nextcloud

# ~/Nextcloud/a/ exists on server
# ~/Nextcloud/a/b/ exists on server
# ~/Nextcloud/a/b/c/ does not exist on server
# ~/Nextcloud/a/b/c/empty.txt does not exist on server

ziggr avatar Apr 22 '19 05:04 ziggr

I really hope someone who codes for the desktop client reads this and will improve it. Fact is that we used Owncloud some years ago and had very similar issues. Then we used Seafile for the last 2-3 years and it worked fine with its desktop client. Nextcloud has quite a momentum right now, so we thought to give it a try again - unfortunately the desktop sync is still a problem as it seems - I can not tell all out users to close and restart the client every day to make shure the files are synced...

Nextcloud has some nice features on the Server - but when it comes to syncing with desktop client it seems to have real issues. Can it really be that so many users use it without even noticing that files are missing on the server? Strange

adrianriedo avatar Apr 22 '19 12:04 adrianriedo

I cannot believe such a HUGE MAJOR bug exists with this software and not get fixed (or even noticed?) for such a long time till today.

I am regretting the efforts I spent trying to set up my personal cloud with nextcloud. This should not be anything from a commercial company. Just hard to believe.

Kambrian avatar May 05 '19 15:05 Kambrian

Please retweet https://twitter.com/GermanoMassullo/status/1125077393272655872

Germano0 avatar May 05 '19 16:05 Germano0