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.Hello,
I decommissioned a machine and installed git annex on another machine, with the same IP as the initial one. To avoid errors, I declared the first repository as dead and created a new one (with a new remote). However, I also had to remove the git remote to the dead machine as "git annex sync" kept telling me synchronizing to this dead machine failed (the ssh succeeded, using the name automatically generated by git annex, but the repository was not at the same path on the new machine, so it could not find it).
Should a dead repository not tried to be synchronized at all during git annex sync?
Thanks,
Alan
git annex dead
for a full git-annex repo (not a special remote) I had in a VPS, but my local machine keeps trying to sync with it ongit annex sync
, asking me to confirm the ssh public key and so on. Is that correct?Both
git annex sync
andgit pull
will still try to access the git remote for the repository. Thing to do to prevent this isgit remote remove
it.I think it makes sense for
git annex sync
to still try to push/pull from a dead remote, since git pull/push will still try to access it too. Marking the remote dead does prevent other git-annex commands from trying to use it for data storage.