![[User Picture]](http://l-userpic.livejournal.com/265901/210712) | From: gaal 2006-08-28 06:55 am (UTC)
| (Link)
|
Oh, excellent, I've been wanting something like this for music. I wonder though if this can't be made better by knowing more about tags. The problem is syncing files several ways, when sometimes the updates are to metadata. Unfortunately the filenames can sometimes change too, so there's no key for this!
![[User Picture]](http://l-userpic.livejournal.com/9624370/1571) | From: evan 2006-08-28 07:03 am (UTC)
| (Link)
|
I have exactly this problem! I guess you could fingerprint the files minus the tags -- the one part that doesn't change is the music data itself.
![[User Picture]](http://l-userpic.livejournal.com/265901/210712) | From: gaal 2006-08-28 07:24 am (UTC)
| (Link)
|
But then how can resume work?
I start syncing by pulling a new file from remotehost to my localhost. Then the download is interrupted, and I resume it. What identifies the partial file on localhost?
![[User Picture]](http://l-userpic.livejournal.com/265901/210712) | From: gaal 2006-08-28 07:26 am (UTC)
| (Link)
|
Hm, maybe the syncer should pre-tag all files with their own fingerprint and make sure that gets transmitted early?
![[User Picture]](http://l-userpic.livejournal.com/54541970/2) | From: brad 2006-08-28 05:14 pm (UTC)
| (Link)
|
Sure there is. The digest of the non-tag part of the file is the key. Screw audio fingerprinting.... ignoring the ID3 stuff of the mp3/ogg when digesting is eash enough. Then just fix the ID3 up on the other side, if the modtime is older.
I just have to say, that is sure one homosexual icon. Lovin' it.
![[User Picture]](http://l-userpic.livejournal.com/5887295/515656) | From: jwz 2006-08-28 08:20 am (UTC)
| (Link)
|
You know the file names are unique, so you don't need to hash: I do this kind of thing on the fly with a keyboard macro that generates "mv" commands...
![[User Picture]](http://l-userpic.livejournal.com/78693333/1425058) | From: iamo 2006-08-28 08:29 am (UTC)
| (Link)
|
However, by using a fingerprint it's somewhat more flexible. It'll work even when the original structure of the two trees were not the same.
I would say that makes it less flexible, as well as somewhat slower.
I'd rather something that was the same "shape" as rsync (ie runs on both ends at once) that tries to move files around to make "rsync" work, based on a number of heuristics (file name, size, last modified date, first bytes, last bytes...) applied in order.
![[User Picture]](http://l-userpic.livejournal.com/54541970/2) | From: brad 2006-08-28 04:32 pm (UTC)
| (Link)
|
Yeah, that's what I wanted too, but I realized it was only a few minute problem if I did the minimal work first.
Later I can add an rsync-ish interface, maybe just ssh'ing to the remote host, running Perl, and piping the original script into it, so the other side doesn't even need treearrange.
![[User Picture]](http://l-userpic.livejournal.com/54541970/2) | From: brad 2006-08-28 04:32 pm (UTC)
| (Link)
|
Not necessarily. I was shooting with two cameras. Both Canons.
unison can do this, albeit not intelligently.
It doesn't have smart tracking of mv's for 3-way merging, but it does have the xferbycopying feature which will check if a remote file with the same checksum exists.
![[User Picture]](http://l-userpic.livejournal.com/4980108/1052633) | From: edm 2006-08-28 09:35 pm (UTC)
Re: unison | (Link)
|
Excellent. I was going to suggest that this feature should really be part of something like rsync (which already walks the directories, takes checksums, compares them, etc). Having a separate script is useful, but it'd be even nicer if it "just worked" in the face of running something like rsync (ie, copied/moved files that have moved, and uploaded any new ones).
Ewen
![[User Picture]](http://l-userpic.livejournal.com/44086932/289404) | From: awwaiid 2006-08-29 06:05 am (UTC)
Re: unison | (Link)
|
Yes, I adore unison... use it to sync my home directory between about six machines, many of them using ssh rsa keys to do it unattended. Work on a project on my machine here tonight, tomorrow I go in to work and it's there waiting.
you could always just sort at work :P
That's pretty sweet. How long does it typically take, though, if it has to generate all those hashes on large data?
(Also, complement?)
![[User Picture]](http://l-userpic.livejournal.com/54541970/2) | From: brad 2006-08-28 06:04 pm (UTC)
| (Link)
|
Faster than uploading them.
![[User Picture]](http://l-userpic.livejournal.com/4175377/936728) | From: fanf 2006-08-28 11:33 pm (UTC)
| (Link)
|
The idea sounds a bit like magicmirror, but I expect that's too dependent on the public FTP archive model. |