bugs/Corrupted drive: Assistant seems consider files deleted and deletes them elsewhere toogit-annexhttp://git-annex.branchable.com/bugs/Corrupted_drive__58___Assistant_seems_consider_files_deleted_and_deletes_them_elsewhere_too/git-annexikiwiki2016-03-12T16:58:09Zcomment 1http://git-annex.branchable.com/bugs/Corrupted_drive__58___Assistant_seems_consider_files_deleted_and_deletes_them_elsewhere_too/comment_1_80ca50f5305eda71fe32f2b0bc922c34/joeyh.name2016-03-12T16:58:09Z2013-10-26T19:22:57Z
<p>It seems to me that if a subdirectory of the repository is on a corrupted drive, and so it's not possible to list the files on it, this is basically the same as if you'd 'rm -rf' that subdirectory. So when it starts up, the assistant will see that these files are not present, and commit a removal to git.</p>
<p>Then when another machine syncs with that, it would delete the files from its repository too. However, it actually keeps the contents of the files stashed away in <code>.git/annex</code>. So to recover from this, all you have to do is <code>git annex indirect</code> and <code>git revert</code> the commit that deleted the files. All your files would then be available again.</p>
<p>However, what you describe is instead that the assistant chose to drop the content associated with the files, but kept the symlinks for them checked into git.
I don't understand why it would do that. Can you show the output of running, on the desktop machine:</p>
<pre><code>git annex whereis $somefile
git annex get $somefile
</code></pre>
<p>Where $somefile is one of the files that has been reduced to a symlink.</p>
<p>Looking at your logs, they appear to be the logs from the server. The strange thing that appears in one of them is "git-annex: Not in a git repository."
which was logged around 2013-10-24 20:07:25 CEST. I am not sure, but I think it might have been the rpi git-annex saying that, because there is also "fatal: '~/store/annex/' does not appear to be a git repository"</p>
comment 2http://git-annex.branchable.com/bugs/Corrupted_drive__58___Assistant_seems_consider_files_deleted_and_deletes_them_elsewhere_too/comment_2_e6bc6d1c0eb8c469e9e00b37bbcc9b86/Carlo2016-03-12T16:58:09Z2013-10-27T19:26:42Z
Thanks for looking into it and the recover instructions, will recover and post back when I'm back at work. I also have an another indirect mode repo on my home desktop as an extra backup so nothing real bad happened, but it's reassuring data's still there at work.
comment 5http://git-annex.branchable.com/bugs/Corrupted_drive__58___Assistant_seems_consider_files_deleted_and_deletes_them_elsewhere_too/comment_5_0d0f6b6b46d0153433fead2bbd1bbe64/Carlo2016-03-12T16:58:09Z2013-10-30T15:05:37Z
<p>The assistant autorecovered my work repo before I noticed, so it looks like I can't provide the necessary info. There were a bunch of files missing that got re-synced from my home PC.</p>
<p>For what it's worth, I noticed that on my phone, when cutting the internet connection while syncing, the assistant downloaded existing files into placeholder files, and then continued actually downloading files when the network connection was restored.</p>
comment 6http://git-annex.branchable.com/bugs/Corrupted_drive__58___Assistant_seems_consider_files_deleted_and_deletes_them_elsewhere_too/comment_6_593a49669e2fadfb91773f8c84fbb031/Carlo2016-03-12T16:58:09Z2013-10-31T10:03:01Z
Of course, the autorecovery wouldn't affect the daemon.log from the work machine... so here they are: http://capocasa.name/work-desktop-ubuntu-12.04-daemonlog.tgz
comment 5http://git-annex.branchable.com/bugs/Corrupted_drive__58___Assistant_seems_consider_files_deleted_and_deletes_them_elsewhere_too/comment_5_6058a22b733cb02126286af950074ed4/joeyh.name2016-03-12T16:58:09Z2013-11-03T01:17:39Z
<p>I don't understand what you mean by "The assistant autorecovered my work repo before I noticed". What repo is the work repo, and how could the assistant "autorecover" it, and what did it do?</p>
<p>At this point, I am completely in the dark about whether you're reporting a problem, and what the problem is.</p>
comment 6http://git-annex.branchable.com/bugs/Corrupted_drive__58___Assistant_seems_consider_files_deleted_and_deletes_them_elsewhere_too/comment_6_5a348c5f327f16e1192ef6bd7f2880bb/Carlo2016-03-12T16:58:09Z2013-11-19T09:48:26Z
<p>Sorry, missed the comment.</p>
<p>My work repo is the repository on my work laptop, where deletions got synced to.</p>
<p>Git annex had then run repository repair automatically, so the odd symlinks where no longer there for me to check out.</p>
<p>It is possible that I ran some git commands in direct mode I shouldn't have; I put the files back in and it's working nicely now. So this might have been a "no direct mode guard" issue.</p>