You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[See forum posting @ http://forum.owncloud.org/viewtopic.php?f=3&t=5612]
I have a home OC server (4.5.2) up and running on a Linux box.
I took a copy of my parents' photos (13Gig of data) on to a USB disk, took the disk home and then copied the photos (using my local network) on the OC server.
I now setup a sync between the photos directory on my parents' PC and the copy on the OC server at my house.
But the client on my parent's PC is a bit stupid and clearly doesn't check the actual file contents, and so starts to copy all the photos back across to the server.
This is a completely pointless operation.
Surely an md5sum (or similar hash calculation) should be performed to determine if a file copy is required. This is how rsync works under Linux.
I'd say this is very important. Can we get appropriate labels put on this issue?
I had a similar issue where my server and my desktop/laptop etc are using Dropbox. I want to have all that moved over to oC - but its a little crazy that the client will want to re-upload and/or re-download everything. Its much cheaper (bandwidth and time-wise) to move everything over on all three platforms and have them all simply notice "oh, everything is okay, nothing to do here".
Ideally, the checksum should actually be an indexed value in the database - in fact it should probably even be the primary key used to identify content. I believe that the system already supports "move" operations (moving a file to another folder within owncloud without causing a deletion/re-upload) - but doing this would actually make supporting this concept trivial.
Please note, md5sum is a good starting point - but it would be much more appropriate to use a variety of checks and to use various cryptographic checksums to ensure that everything is consistent across all systems:ǂ
timestamp
filesize
checksum
If filesize and checksum matches but timestamp differs, then only a tiny change should be actioned (fixing the timestamp).
In any other case, an rsync-style differential upload/download should be actioned.
ǂ All of this information should be stored in the client and server databases when files/folders are added to the repository. Recalculating hash values every time the client starts would be madness. Having this stored within the client database would also improve the "time to first sync" in the case of content having changed while the client wasn't running.
First of all, thanks to the dev for the amazing OwnCloud.
I would like to know how far you are with solving this type of issue?
I live and work in Africa: Internet access are slow, and most of the time data plans are limited in download. So it’s very expensive to resync a folder on a new computer with some GB of data. With Dropbox, we just copy the files on an USB stick, and copy them to the new computer before syncronizing it. Then we don’t need to download data again and the sync works fine.
How is it possible with owncloud? Does the unique ID make this possible? When I copy my files, can I copy the unique ID too? If not, we are forced to download again, what is very unconfortable for large amount of data…
I tried to copy the whole folder, but it doesn't seem to work:
I copy the entire folder locally, with a new name
I set up a new folder sync with mirall (1.4.0 on Windows 8 / owncloud 5.0.11 on Ubuntu Server 13.04)
I launch the sync: it downloads everything again for the new sync :-( And it even created conflicted copies of each files :-( ( (and conflict files don't have the same size, see attached picture)
I have to precise that I do not use owncloud in a standard way: I don’t want to sync all my data locally, as it is proposed during the initial setup of the client. So I deleted this first “sync pair”, and created new pairs with individual folders.
I have to precise too, that for test purpose, I made this on a single computer, with the same client (which should sync the same folder on the server with 2 localization on the same computer)
the clients calculating the hashes while the server simply "takes note" of the hashes fed to it by the clients
I think that if we do that, we reverse the situation, but we still have a problem. These hashes would be stored in a database on the server, and if this DB is corrupted for any reason, then the client will decide to upload everything.
Both sides (client and server) must be able to rebuild the DB by its own, without downloading/uploading everything.
calculating the MD5 on the client if the contents really changed is something we can discuss. (Hint: A specific feature request describing exactly that would help).
So we're in a kind of bad loop :-( Who is the egg, who is the chicken? ;)
I can open a new issue if you think it's better: I would open it in core, not in mirall. But before that, I would like to summarize our last discussions and your explanation on the sync algorythm somewhere. Is there already a wiki on it? Or a beginning of explanation? Do I start one? (in this case, which template could I use?)
I think that if we do that, we reverse the situation, but we still have a problem. These hashes would be stored in a database on the server, and if this DB is corrupted for any reason, then the client will decide to upload everything.
It is true that this could still be an issue. If the clients can simply point out "Hey, my etag is still the same, here's the right hash" then that eliminates the upload. HOWEVER, we still have the same situation anyway for if the etags are corrupted on the server?
Either way, the fix isn't really intended to deal with corruption (which should be a rarity) and, in the worst case implementation, only a single client would need to re-upload the content. None of the other clients would need to re-download the content. This would already be a major improvement over the current status.
Why should it be more frequent to have a problem with the local data base of the client than with the data base on the server? Servers do crash too or do have probems, don't they?
OK, so a solution could be to consider as a priority the implementation of hash calculation on client side. And then, to implement it on server side later.
Because I still believe that hash calculation demands less ressources than redownloading, but perhaps I'm wrong.
@dragotin what do you suggest concerning my proposal hereabove about the new issue and the wiki?
@etiess: I also see hash calculation as being much less of a burden than re-up/downloading. The client cpu is faster than the network in 99.9% of use-cases (disk shouldn't be compared as it is used for local hashing as well as re-up/download anyway). Network usage is also costly for some. Assuming support from the devs, my proposal going forward is as follows:
Implement server-side db/api support for content-hashing
Implement optional client-side support for content-hashing and client-side support for hash-based decision-making
Implement optional server-side content-hashing
Figuring out #5305 is a good step (and perhaps more urgent) in solving some of the issues mentioned here but won't cover everything unfortunately. This isn't a small problem/fix and so deserves some forethought.
Actually I'm not aware of any problems with the current approach so no need to do expensive hashing as discussed a lot of times already.
Please point us to a reproducible issue here then we can fix it. Thanks.
@karlitschek I'm just suggesting here that this issue #523 could be closed, as it has been solved by @dragotin in #5231. But if you think it needs testing and confirmation in OC6, I understand.
The debate around hashing is another question for me.
Activity
blizzz commentedon Nov 20, 2012
Which client version?
mpfj commentedon Nov 20, 2012
Latest client for Windows (1.1.1)
DeepDiver1975 commentedon Nov 25, 2012
Please reopen this issue within the mirall repo. Thx
danimo commentedon May 1, 2013
I am reopening this issue here, since without the server providing an MD5 sum, there is nothing we can do in the client.
danimo commentedon May 1, 2013
Note: we could at least have hash sums for the files that we have exclusive access to.
jancborchardt commentedon Aug 8, 2013
So what’s the call on this one? Fixed? Important to work on? Please advise.
zatricky commentedon Sep 5, 2013
I'd say this is very important. Can we get appropriate labels put on this issue?
I had a similar issue where my server and my desktop/laptop etc are using Dropbox. I want to have all that moved over to oC - but its a little crazy that the client will want to re-upload and/or re-download everything. Its much cheaper (bandwidth and time-wise) to move everything over on all three platforms and have them all simply notice "oh, everything is okay, nothing to do here".
Ideally, the checksum should actually be an indexed value in the database - in fact it should probably even be the primary key used to identify content. I believe that the system already supports "move" operations (moving a file to another folder within owncloud without causing a deletion/re-upload) - but doing this would actually make supporting this concept trivial.
Please note, md5sum is a good starting point - but it would be much more appropriate to use a variety of checks and to use various cryptographic checksums to ensure that everything is consistent across all systems:ǂ
timestamp
filesize
checksum
If filesize and checksum matches but timestamp differs, then only a tiny change should be actioned (fixing the timestamp).
In any other case, an rsync-style differential upload/download should be actioned.
ǂ All of this information should be stored in the client and server databases when files/folders are added to the repository. Recalculating hash values every time the client starts would be madness. Having this stored within the client database would also improve the "time to first sync" in the case of content having changed while the client wasn't running.
etiess commentedon Sep 12, 2013
Hello,
First of all, thanks to the dev for the amazing OwnCloud.
I would like to know how far you are with solving this type of issue?
I live and work in Africa: Internet access are slow, and most of the time data plans are limited in download. So it’s very expensive to resync a folder on a new computer with some GB of data. With Dropbox, we just copy the files on an USB stick, and copy them to the new computer before syncronizing it. Then we don’t need to download data again and the sync works fine.
How is it possible with owncloud? Does the unique ID make this possible? When I copy my files, can I copy the unique ID too? If not, we are forced to download again, what is very unconfortable for large amount of data…
I tried to copy the whole folder, but it doesn't seem to work:
I have to precise that I do not use owncloud in a standard way: I don’t want to sync all my data locally, as it is proposed during the initial setup of the client. So I deleted this first “sync pair”, and created new pairs with individual folders.
I have to precise too, that for test purpose, I made this on a single computer, with the same client (which should sync the same folder on the server with 2 localization on the same computer)
A lot of subject have been opened on this issue, whereas I'm not sure they have the same origin:
owncloud/client#110
owncloud/client#49
owncloud/client#779
http://forum.owncloud.org/viewtopic.php?f=14&t=15493&p=40791#p40791
Thanks for your help!
Etienne
bugsyb commentedon Sep 24, 2013
+1 for implementing hash based verification of the content as there's nothing like voting system
AykutCevik commentedon Oct 1, 2013
Is there any workaround for now until the md5 based solution will be developed? Having big troubles due to resyncs...
etiess commentedon Oct 1, 2013
@AykutCevik For the moment unfortunately not.
You can follow owncloud/client#994 and post your logs to help the team.
zatricky commentedon Oct 7, 2013
My apologies for the excess comment-traffic - I'd intended on suggesting using multiple hashsums but forgot to mention it.
I'd suggest using MD5 as a primary hashsum and using SHA256 or SHA512 as the second.
Though not a security issue, per se, I would not use md5sum alone for the reasons cited here:
https://en.wikipedia.org/wiki/MD5#Security
20 remaining items
etiess commentedon Oct 11, 2013
@zatricky proposed:
I think that if we do that, we reverse the situation, but we still have a problem. These hashes would be stored in a database on the server, and if this DB is corrupted for any reason, then the client will decide to upload everything.
Both sides (client and server) must be able to rebuild the DB by its own, without downloading/uploading everything.
But perhaps I misunderstood you?
etiess commentedon Oct 11, 2013
@dragotin proposed:
I assume you think that owncloud/client#110 isn't precise enough? In this issue, @danimo wrote:
So we're in a kind of bad loop :-( Who is the egg, who is the chicken? ;)
I can open a new issue if you think it's better: I would open it in core, not in mirall. But before that, I would like to summarize our last discussions and your explanation on the sync algorythm somewhere. Is there already a wiki on it? Or a beginning of explanation? Do I start one? (in this case, which template could I use?)
Thanks!
zatricky commentedon Oct 11, 2013
@etiess wrote:
It is true that this could still be an issue. If the clients can simply point out "Hey, my etag is still the same, here's the right hash" then that eliminates the upload. HOWEVER, we still have the same situation anyway for if the etags are corrupted on the server?
Either way, the fix isn't really intended to deal with corruption (which should be a rarity) and, in the worst case implementation, only a single client would need to re-upload the content. None of the other clients would need to re-download the content. This would already be a major improvement over the current status.
etiess commentedon Oct 11, 2013
Why should it be more frequent to have a problem with the local data base of the client than with the data base on the server? Servers do crash too or do have probems, don't they?
zatricky commentedon Oct 11, 2013
It should be rare on both sides - but it is no problem for the client to recalculate the hash.
etiess commentedon Oct 11, 2013
OK, so a solution could be to consider as a priority the implementation of hash calculation on client side. And then, to implement it on server side later.
Because I still believe that hash calculation demands less ressources than redownloading, but perhaps I'm wrong.
@dragotin what do you suggest concerning my proposal hereabove about the new issue and the wiki?
zatricky commentedon Oct 13, 2013
@etiess: I also see hash calculation as being much less of a burden than re-up/downloading. The client cpu is faster than the network in 99.9% of use-cases (disk shouldn't be compared as it is used for local hashing as well as re-up/download anyway). Network usage is also costly for some. Assuming support from the devs, my proposal going forward is as follows:
Figuring out #5305 is a good step (and perhaps more urgent) in solving some of the issues mentioned here but won't cover everything unfortunately. This isn't a small problem/fix and so deserves some forethought.
zatricky commentedon Oct 15, 2013
Random gem: Amazon S3 apparently supports getting md5hashsums without having to download the content. This of course doesn't cover all back-end cases and also isn't necessarily easy to get to, depending on how the storage is mounted.
http://docs.aws.amazon.com/AmazonS3/latest/API/RESTObjectPUT.html
etiess commentedon Nov 21, 2013
Hello,
Well, there's still a debate around MD5, hashsums, ...
But concerning this issue in particular, carying data on USB disk, I think it has been solved now, and should be closed (see #5231).
@dragotin, @danimo, @karlitschek what do you think? Which issue should be used to continue the discussion about hashing?
karlitschek commentedon Nov 21, 2013
Actually I'm not aware of any problems with the current approach so no need to do expensive hashing as discussed a lot of times already.
Please point us to a reproducible issue here then we can fix it. Thanks.
karlitschek commentedon Nov 21, 2013
And just to add one more comment. We worked on this issue and we hope that it is fixed with ownCloud 6. But this needs testing and confirmation.
etiess commentedon Nov 21, 2013
@karlitschek I'm just suggesting here that this issue #523 could be closed, as it has been solved by @dragotin in #5231. But if you think it needs testing and confirmation in OC6, I understand.
The debate around hashing is another question for me.
karlitschek commentedon Nov 21, 2013
That's actually a very good point, Let's close it now. We can always reopen it if there is a new reproducible bug. Thanks