forum/Annex contents just disappeared?git-annexhttp://git-annex.branchable.com/forum/Annex_contents_just_disappeared__63__/git-annexikiwiki2013-11-27T22:47:37Zcomment 1http://git-annex.branchable.com/forum/Annex_contents_just_disappeared__63__/comment_1_4ab5ca00f912c0c95fabc10f2d9600d3/John2013-11-27T22:47:37Z2013-08-23T03:06:00Z
<p>Wait, I think this comes from a backend switch. I changed my .gitattributes file at one point to read:</p>
<ul>
<li>annex.backend=SHA512E annex.numcopies=2</li>
</ul>
<p>I thought this would just affect new files, not existing annexed content. Could this do it?</p>
comment 2http://git-annex.branchable.com/forum/Annex_contents_just_disappeared__63__/comment_2_657f737c5d64d440aa133ddb41408fbc/John2013-11-27T22:47:37Z2013-08-23T03:14:15Z
Yes, that was the problem, sorry to bother you. None of my data is gone, it's just sitting there under unknown names. I can roll back to when it knew the names, and migrate them forward.
comment 3http://git-annex.branchable.com/forum/Annex_contents_just_disappeared__63__/comment_3_9b4c35feb14b37d43d053d7430da9abf/joeyh.name2013-11-27T22:47:37Z2013-08-23T04:28:45Z
<p>If you change the backend, and then in one repository you run <code>git annex migrate</code>, other repositories that have the old keys will not know about the new names. For this reason, then multiple repositories have the files, it's best to run it redundantly in each repository.</p>
<p>TBH, migration is a bit of a PITA because of this. Best to aovid it in most cases.</p>
<p>Git-annex will never perform a migration begind your back. You must have run <code>git annex migrate</code> at some point. You can check the git history for details.</p>
comment 4http://git-annex.branchable.com/forum/Annex_contents_just_disappeared__63__/comment_4_c3625409652bff5f2165260803269a8a/John2013-11-27T22:47:37Z2013-08-30T06:06:16Z
<p>Just to confirm, this wasn't a git-annex problem at all, but just a misstep during migration as you suggested.</p>
<p>I think what I'm going to do now is to just wipe the slate clean and start over again, by using <code>unannex -fast</code> on all the files, wiping <code>.git</code>, and then adding everything back in using my new default backend of SHA512E. The bigger pain is doing the same thing on all the servers where I have this data (to avoid having to upload it again), but in such a way that I'm not replicating file history. I think I should be able to just clone, <code>mv $OLDREPO/.git/annex/objects objects</code>, <code>git annex add objects</code>, <code>git rm -r --cached objects</code>, and then everything should be good without even needing a new commit on the remote machine, just a git-annex sync.</p>