2011-03-09 19:59:44 +00:00
|
|
|
Suppose something goes wrong, and fsck puts all the files in lost+found.
|
|
|
|
It's actually very easy to recover from this disaster.
|
|
|
|
|
|
|
|
First, check out the git repository again. Then, in the new checkout:
|
|
|
|
|
2011-04-03 01:52:57 +00:00
|
|
|
$ mkdir recovered-content
|
|
|
|
$ sudo mv ../lost+found/* recovered-content
|
|
|
|
$ sudo chown you:you recovered-content
|
|
|
|
$ chmod -R u+w recovered-content
|
|
|
|
$ git annex add recovered-content
|
2013-11-28 07:25:31 +00:00
|
|
|
$ git reset HEAD recovered-content
|
2013-11-28 07:26:46 +00:00
|
|
|
$ rm -rf recovered-content
|
2011-04-03 01:52:57 +00:00
|
|
|
$ git annex fsck
|
2011-03-09 19:59:44 +00:00
|
|
|
|
|
|
|
The way that works is that when git-annex adds the same content that was in
|
|
|
|
the repository before, all the old links to that content start working
|
2015-11-13 17:46:11 +00:00
|
|
|
again. So, this works as long as you're using one of the SHA* or other
|
|
|
|
checksumming backends, which is the default.
|