I have a large repo full of movies (dvd and blue-ray rips). I host it on my ubuntu linux 16.04 xenial system which sits next to my tv.
I use git annex sync to copy stuff to my mac laptop running high sierra and I just updated to the brew version of git-annex there, 6.20171109
I also have a copy on my really old laptop running mac os x lion, that one has a really really old version running.
I hadn't done a git annex sync in a long time. so I updated via brew on my high sierra laptop to 6.20171109 and ran git annex sync on the laptop, and then on my server.
when I ran git annex sync on my server, i saw it modify the 6 or so movies which I had copied over to the old lion laptop long ago. those six movies are now pointed to hashes which don't exist, and when I look at the history, the previous hashes don't exist either.
then I ran a git annex fsck on the server, and it listed tons of movies which is says have no known copies. at some point, all of them were on the server. I suspect, but don't know how to confirm, that all the movies are still sitting in the annex on the server, but many many of the links are wrong.
how can I fix the links?
thanks.
oh, it might have been something dumb i did:
at some point I wanted to delete a few files, so trying to be cute I did this:
m=OneMovie.m4v git annex drop --force $m; git rm $m; git ci -m "rm $m"
I noted that didn't work, but didn't realize it might've taken out most/all the files in the folder
There are two possible things that could have happened.
Maybe something somehow wrong got committed to the git repository for the missing files.
If so, you can always use git to check out the older version before that commit, and will then be able to see the files; git-annex will know where the content of them is, etc. You can also use
git revert
to revert such a bad commit.Maybe you accidentially dropped the content of the files with --force, and if so, you may have lost the content.
If you run
git annex log
on one of the files, and look at the lines starting with "-", you can see when the file content was removed from repositories. But there's no way to get it back unless you have another copy somewhere.I'm nearly 100% certain I did a drop --force by mistake. I'm pulling the files from backups.
thank you!