Unnecessary redownload of a synced folder carried on a USB stick
As @dragotin suggested me, I report this unnecessary redownload of a synced folder, after having copied it on a new computer through a USB stick.
Steps:
- Sync a folder on computer A
- Copy the folder on computer B with a USB stick, including the csync_journal.db
- Configure the OC sync of this folder on computer B Result: the client redownloads the data, instead of seeing that they are already there.
All logs and csync_journal.db (before and after the sync) are available here: https://www.sugarsync.com/pf/D6476655_61894308_919677
This is perhaps related to https://github.com/owncloud/core/issues/523 (Pointless re-sync of entire folder), https://github.com/owncloud/mirall/issues/994 (client 1.4 unnecessarily downloads again those files which are already downloaded) and https://github.com/owncloud/mirall/issues/110 (Use MD5 sum to confirm file has changed).
CC @mpfj, @zatricky, @jochenwezel, @danimo, @RandolfCarter may be interested
The reason why the files are downloaded again is that the copying changes the inode of the files. And the inode is one of the compare criteria in 1.4.1. We have removed that for the next version.
Maybe someone wants to retest that with a nightly build?
I would like to test a nightly build, but I'm really not skilled enough to build the client on windows (following: http://doc.owncloud.org/desktop/1.4/building.html)
Is there a windows client available for the latest nightly? (I didn't find it on http://download.owncloud.com/download/nightly/)
Sorry for my incompetence!
here we go: http://download.owncloud.org/download/nightly/ownCloud-1.4.80-nightly20131011-setup.exe
BUT: Be warned, this is really still beta software, NEVER use it in a production setup.
@etiess: There is no need for a sorry and no incompetence. You already have proofed a lot of competence by testing and bug reporting and stuff.
Thanks @dragotin ! But I have an error after the installation, when I try to launch the program: "QtSql4.dll is missing" Mirall 1.4.1 doesn't have any problem.
ah yes. True. @danimo could you add the missing dll to the windows build?
According to the cmake file, it should get deployed. I'll look into it.
Hello @danimo
I tried to install http://download.owncloud.org/download/nightly/ownCloud-1.4.80-nightly20131014-setup.exe but I still have the problem with QtSql4.dll Does it come from me? Thank you! Etienne
@etiess no it does not come from you, it just means that @danimo has not yet looked into.
I also have this problem, I even write script to change inodes (and others) in .csync_journal.db, but it still redownload all files. http://pastebin.com/e0t9VYkG
Hello @dragotin I finally tested it again, on the same computer because I don't have any other one to test. Config: Mirall 1.4.2 on Windows 8.1 x64, Server on Ubuntu server 13.10, Mysql, 5.0.12:
- Sync a folder A for the Window's user "user1"
- Stop Owncloud
- Make a copy of A called "A Copy" on the same computer
- Configure the sync of "A Copy" for the Window's user "user2"
- Mirall recognizes that the folder is already synced, and doesn't download everything again.
I didn't test it with 2 computers and a USB stick yet, but it should be the same, shouldn't it? If you want to verify that it works as you expected, the log of steps 4 and 5 is here: https://www.sugarsync.com/pf/D6476655_88319109_19579
The issue should be closed I think, congratulations @dragotin
Was able to achieve the above with a USB drive, however: the only way of ensuring that the copies were absolutely identical was to zip the relevant folder before copying.
Even robocopy did not work (as you gather, I did this in Windows).
@karlitschek I confirm what @Omnimercador says: I experienced a partial redownload of my 20 GB in a fresh reinstall of my Windows. My whole folder "pictures" was copied on an external HDD, then copied back on my laptop HDD. And Mirall 1.5.4 decided to redownload about 2 GB from the server (OC 6.0.3). I didn't test it ziping it, but I'll know this workaround for the future. Is there a way to fix this issue?
Yes, you need to preserve the file metadata such as modification time. Zipping does that.
OK, good to know. It may be interesting to include this information in the documentation, if it's not already described. And I don't understand why Windows would modify the modification time, just copying it?
I specifically used robocopy to ensure that file parameters like permissions and date stamps (of files and folders) would remain unchanged. However, that didn't work - my impression was that the folder's parameters are somehow affected, rather than specific files, changing the overall path of a file (although I'm not sure whether that would make a difference, as I don't fully understand how files are compared ;-)! )