Looking for some guidance as I'm not currently producing any error messages to guide me. I keep a copy of an annex on my laptop and on two separate external hard drives such that each hard drive holds all the content of the annex. However, there are files with content on drive 2, which I can't get onto drive 1. When I run $git annex get . or $git annex sync "drive2" --content the content of the files is not transferred, not even attempted. My impression is that git annex believes the content is already present, but is somehow disconnected from whatever is showing in the repository.
I don't know if this is relevant or not, but I recently transitioned from running windows to linux. During that process I was getting pre-commit hook errors. Following advice from online, I deleted .git/hooks/pre-commit to (presumably) regenerate those hooks. I also got a post-merge hook error just before the behavior above started happening. However, I'm unable to produce that error now. The only thing I could find online about the post-merge error was here https://stackoverflow.com/questions/3563904/git-hook-post-merge-error-cannot-run which seems relevant, but I wasn't able to make out what I need to do to resolve my issue.
Any help will be appreciated. Thanks!
What version of git-annex are you using?
I suggest you run "git-annex fsck" passing it the name of the file your are having problems with. Show what, if anything, it outputs.
Hi, thanks! That was just what I was looking for. I haven't had to use that command before but it looks pretty useful. I ended up running on the entire annex and found files that needed "fixing" I wasn't even aware of. Do you recommend periodically running this just to make sure everything checks out, or should I only run it when I discover a problem?
For some of the files, it claims that no known copies exist and there is not .git/annex/bad directory. Is that game over for those files? (Only a handful, so not the end of the world, but would be nice to recover them.)
You should not need to fsck regularly. The question is, what happened to make those files that git-annex thinks are present go missing. One possible way would be if there was an actual data corruption of files on the drive.
git-annex fsck
only mentions.git/annex/bad/
when it discovers that a file's content on disk has gotten corrupted. It then moves it to that directory, and mentions that it has. So this makes me think your drive must have data corruption. This is only a guess, since you unfortunately did not paste the output, like I asked for..