From 9229d182d32570f6829ced655aa673ceddfe7693 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Wed, 9 Mar 2011 15:59:44 -0400 Subject: update --- doc/future_proofing.mdwn | 3 ++- doc/walkthrough.mdwn | 1 + doc/walkthrough/recover_data_from_lost+found.mdwn | 17 +++++++++++++++++ 3 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 doc/walkthrough/recover_data_from_lost+found.mdwn diff --git a/doc/future_proofing.mdwn b/doc/future_proofing.mdwn index 4fc8246b6..3937e9265 100644 --- a/doc/future_proofing.mdwn +++ b/doc/future_proofing.mdwn @@ -33,4 +33,5 @@ problem: for the data that encode everything needed to match it back to the metadata. So if a filesystem is badly corrupted and all your annexed files end up in `lost+found`, they can easily be lifted back out into - another clone of the repository. + another clone of the repository. Even if the filenames are lost, + it's possible to [[walkthrough/recover_data_from_lost+found]]. diff --git a/doc/walkthrough.mdwn b/doc/walkthrough.mdwn index 1e8ad7e98..3b4f7d56a 100644 --- a/doc/walkthrough.mdwn +++ b/doc/walkthrough.mdwn @@ -23,4 +23,5 @@ A walkthrough of the basic features of git-annex. backups untrusted_repositories what_to_do_when_you_lose_a_repository + recover_data_from_lost+found """]] diff --git a/doc/walkthrough/recover_data_from_lost+found.mdwn b/doc/walkthrough/recover_data_from_lost+found.mdwn new file mode 100644 index 000000000..6e2c24148 --- /dev/null +++ b/doc/walkthrough/recover_data_from_lost+found.mdwn @@ -0,0 +1,17 @@ +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: + + mkdir recovered-content + sudo mv ../lost+found/* recovered-content + git annex add recovered-content + git rm recovered-content + git commit -m "recovered some content" + git annex fsck + +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 +again. This works particularly well if the SHA1 backend is used, but even +with the default backend it will work pretty well, as long as fsck +preserved the modification time of the files. -- cgit v1.2.3