owncloud / client

🖥️ Desktop Syncing Client for ownCloud
GNU General Public License v2.0
1.4k stars 666 forks source link

Client (Win x74, 1.6.1) downloads all synced files again after update to OC7 #2005

Closed Siedlerchr closed 10 years ago

Siedlerchr commented 10 years ago

Hi,

I just updated my OwnCloud version to 7 and restarted the sync client (Win 7 x64). After the installation of OC7 I moved the contents of my old data folder (renamed) to the new data folder on the OC 7 installation.

Now the sync clients starts to download all my files from the server again.

I use selective folder sync.

In the journal-log.txt File there are only these entries:

=#=#=# Syncrun started 2014-07-25T18:54:48 until 2014-07-25T18:54:50 (1461 msec)

=#=#=# Syncrun started 2014-07-25T18:59:50 until 2014-07-25T18:59:52 (1174 msec)

=#=#=# Syncrun started 2014-07-25T19:04:52 until 2014-07-25T19:04:56 (3294 msec)

oclsync

Any idea why this happens? I don't wanna download all my already synced stuff again.

Regards Siedlerchr

ghost commented 10 years ago

I had this problem too and it seems like it only occurs when the data directory is copied.

My guess is that as soon as the files are copied the unique file id changes and the client needs to pull the "changed" files to actually check if they changed.

A workaround is to change your data directory to a location outside of the webserver (as recommanded by the owncloud docs), this way, after syncing one last time, you are set for the next mayor releases. (Also it seems, when only moving the data dir, no resync is triggered)

P.S. The data directory of the server is meant.

dragotin commented 10 years ago

Once the data dir is copied, the modification times of the files are changed and that makes the system think the file has changed. Next time you should copy in archive mode which does not change the modification time.

MU7L3Y commented 10 years ago

@dragotin what do you mean "copy in archive mode"? I keep experiencing this problem where it re-downloads all my files again.... I'm using shared hosting with cpanel and I have been copying the data directory which I read now is not recommended.

ghost commented 10 years ago

For example cp -a copies in archive mode according to the man page.

MU7L3Y commented 10 years ago

@Aentfs How can you do that in a cpanel file manager though? I just have a right-click copy..

ghost commented 10 years ago

I am not using cPanel, but most probably you can't. Best way would be to move your data dir to a different directory (outside of the www folder). So you don't need to copy it anymore.

MU7L3Y commented 10 years ago

But then how is that a backup? I would have to move it back to continue using my cloud and therefore have no backup copy.

ghost commented 10 years ago

You can point your ownCloud to the new data dir with the conf/conf.php file. Then you can make backups of the data dir as usual and you don't need to copy the data dir back on a major version update.

dragotin commented 10 years ago

sorry, I don't know cPanel. cp -a does copying without changing the modification time, which is the crucial point.

Siedlerchr commented 10 years ago

@MU7L3Y I searched a bit around for that problem and it seems, that cPanel doesn't support his option: http://forums.cpanel.net/f5/cpanels-file-manager-does-not-preserve-modification-date-when-copying-files-349812.html

BUT, you can do this via your FTP Client (e.g. in FileZilla: Transfer Menu -> Preserver Modification Time) if your server supports the MDTM command:

See here for details. https://forum.filezilla-project.org/viewtopic.php?f=2&t=4963

SSH also should support this. Please let me know if that works for you.

Regards, Siedlerchr

MU7L3Y commented 10 years ago

Thanks guys. I have just tested FileZilla with that setting and it does keep the time as it was. I still don't know how that really helps me though....I don't want to download the files through FTP - I already have them on my PC and I don't want to download other users files to my PC. I just want to make a copy of the data (on my shared hosting server) before updating/upgrading my ownCloud server. I will delete the backup after I confirm the update works.

At the moment I'm thinking of not even doing a copy or move as even moving my files with cPanel caused them to re-download. Next point release I might just rename my ownCloud folder, delete everything in it except data, config and themes, make a copy of config and themes only, extract the release into that folder, then rename it back. Think that will work? Obviously I won't have a backup of data which I really should but I can't keep re-downloading my files all the time.

Siedlerchr commented 10 years ago

What about moving the files or renaming the folder on the server site with FileZilla? Before Update you rename your data dir to data_old. After succesful update move the data from the data_old dir to the newly created data dir from owncloud, And using the selected option in transfer I think, that could work.

I tested moving a file around on the server with FileZilla and it kept the modification date.

Regards

2014-08-08 1:29 GMT+02:00 John notifications@github.com:

Thanks guys. I have just tested FileZilla with that setting and it does keep the time as it was. I still don't know how that really helps me though....I don't want to download the files through FTP - I already have them on my PC. I just want to make a copy of my data (on my shared hosting) before updating/upgrading my ownCloud server.

At the moment I'm thinking of not even doing a copy or move as even moving my files with cPanel caused them to re-download. Next point release I might just rename my ownCloud folder, delete everything in it except data, config and themes, make a copy of config and themes only, extract the release into that folder, then rename it back. Think that will work? Obviously I won't have a backup of data which I really should but I can't keep re-downloading my files all the time.

— Reply to this email directly or view it on GitHub https://github.com/owncloud/mirall/issues/2005#issuecomment-51546163.

MU7L3Y commented 10 years ago

@Siedlerchr I just upgraded to 7.0.2 and did what you said and it worked perfectly. Thanks a lot. I'm so glad I don't have to download my data again.

Siedlerchr commented 10 years ago

@MU7L3Y Thanks for your feedback. I will also try it with the next update, Maybe someone should add this tip to a wiki/FAQ page.