I have a large archive repository copied on an LTO tape, plus a proxy version of it with data dropped on local HDD. I've added this stripped proxy as a remote to a central repository to keep track of what is stored on the tape. Unfortunately, since the proxy has no contents, the central repo thinks there are no copies available anywhere, even though the offline tape contains all the data.
How could I convince the central repo that the copies do in fact exist, even if they are very much offline?
You can use
git annex setpresentkey
to tell git-annex that a remote with a given uuid contains a given content.For example, if the proxy remote is named proxy and you know it contains all annexed files in the current directory and below, you could run this to tell git-annex that the proxy contains all the files it thought it didn't contain:
There will be some problems using this empty proxy remote, eg if you run
git annex move somefile --from proxy
, git-annex will try to delete the content from it, see the content is not there, and update its location tracking to say that the proxy does not contain the content any longer.git annex fsck --from proxy
will do similar so you'll need to avoid it.And, you'll probably want to use
git annex trust proxy
so thatgit-annex drop
assumes it contains the content you said it has; by default git-annex will double-check and that check will fail.To avoid all these kind of issues with the proxy, a better approach might be to make a custom special remote that actually accesses the data on the tape drive. See special remote implementation howto
Indeed, making the proxy remote not accessible will avoid such probles.
You will certianly need to make git-annex trust the remote if you want it to count the tape as a copy of a file.