Hi,
I've been a git-annex user for few years now, and I'm progressively migrating old rsync backups into git-annex. Most of the time I create new fresh repos or special remotes and re-upload all data into it. But I'm now facing an issue with this workflow: one of the remote disk I use has a very low connection. Since it has already a complete up-to-date plain copy of all files, I'd like to avoid the "re-upload" phase.
I was thinking of using a directory/rsync special remote, and feed it with the existing local content. But the file names & paths are not the usual plain ones.
is this a good idea ?
if yes, what is the way to retrieve the "special remote" path of each file ? I'm not against scripting a little if necessary.
if no, what can I do ?
Few additional notes:
I can't ssh to the remote, this is a windows share with a FAT fs underneath.
I think I can assume all the remote files are good, they are transfered and checked by rsync.
I think if you don't mind scripting checkout Joey's comment in this thread: "Preseeding" a special remote.
Otherwise maybe the following will work. You'll still need to download all of the files to hash them.
UNTESTED: Lets say your Windows share data is at mnt/share/data
If you don't care about hashing you could use the WORM backend avoiding the initial download.
I think, If you don't care about having a nice working tree you could probably use the web special remote and just leave all the files in their messy rsynced state. IE create a local repo, then do
git annex addurl --fast <path>
for each file on your Windows share. See joey's comment on addurl in this DVD threadThks for the answer, I found many interesting info. I ended up scripting my own crappy stuff, please see below:
Basic usage: annex_populate(m) /my/destination/folder/ /my/source/folder
Principle: we get each file key from the current repository, then build the special remote backend filename and launch the copy/move operation.
Warning:
before using it, make a backup of your data !
it was very little tested: it worked for me and I stopped there. Like many scripts in my toolbox, it may malfunction in different cases than mine.
it should copy files unless you define MOVE=X (or have it defined in your shell ! beware).