I am trying to follow this guide:
https://git-annex.branchable.com/walkthrough/
I:
- created a repository
- added a remote
- added all the files via
git annex add .
- commited my changes
- synced my repositories
By the time I tied to actually get the content from repo one into repo two (via git annex get folder
) I noticed that all of my stuff had been deleted from repo one (and not backed up by git annex anywhere else!).
How can I get my stuff back?
Also, why would any software which is meant for backup or archiving (or any sane software in general) delete stuff without me actually typing rm
or delete
into the terminal and without giving me a big warning message and a confirmation prompt?
Are you sure the files are actually deleted? You don't mention using direct mode or anything, so you should be able to reset the git repository to the last commit you did (restoring the symlinks) and be back on track.
Sounds like you missed something either in your description of the problem, or while following the tutorial.
Apparently what happened is that whenever you want to set up git annex, you have to create just one repository, them move your files to a temporary folder on all your other media, clone the repository to the other media, and then copy all your files back to the clone and add them to git annex. This is a horrible workflow and not mentioned anywhere. If you do the intuitive thing and start by making a bunch of repos, because all repos are created equal, git annex will happily delete all your stuff on some of them.
Indeed, as you correctly mention, this can go horribly wrong if you use direct mode and cannot recover your files. A shame, really, that direct mode is the only mode in which you actually have write and copy access to your files, and thus, for most - including myself - the only sane way of managing your files. For the record, I was able to retrieve my files, but to this day git annex is the only software I ever used that ever managed to lose my data.