So you lost a thumb drive containing a git-annex repository. Or a hard drive died or some other misfortune has befallen your data.
Unless you configured backups, git-annex can't get your data back. But it can help you deal with the loss.
Go somewhere that knows about the lost repository, and mark it as dead:
git annex dead usbdrive
This retains the location tracking information for the repository, but avoids trying to access it, or list it as a location where files are present.
If you later found the drive, you could let git-annex know it's found like so:
git annex semitrust usbdrive
Is there a way to have git-annex completely ignore a repository? I see that the
dead
command adds the uuid of the repository totrust.log
but does not changeuuid.log
. Is it enough to remove the corresponding line inuuid.log
andtrust.log
?dead
is the best we can do. The automatic merging used on the git-annex branch tends to re-add lines that are deleted in one repo when merging with another that still has them.git-annex forget
?I wouldn't recommend running
git annex forget --drop-dead
right after losing a drive. You might find the drive again, or get the dead drive to work again. Even if you know you'll never find it, you may want to query git-annex to find files that were only located on that drive, and deal with them, etc.But if you're worried about that information in the git-annex branch cluttering up the git repository, you keep in mind that
git annex forget
will let you remove it at some point in the future.Unfortunately, I plugged in the drive and it was alive just long enough to clone the repo and pull down about half of the data. Then it just started clicking. I did my best to wipe the drive before I returned it, but it didn't even make it that far.
Now I've got a replacement drive. Since my system auto-mounts based on the partition label; I had been using the label to identify external drives. So I want to describe the drive the same way to my system & git-annex.
In this case, I think I'd like to completely get rid of any notion the repos have of the old drive.
git annex forget --drop-dead
in that situation, but what I would do is firstgit annex describe lostremote "my old drive that I lost"
and then set up the replacement drive with whatever description you had before.