If I would want to back up my whole Linux system, what's unclear or maybe missing from Git Annex:
I'm not exactly sure about the best way to import the files. Should I just copy over all the files (e.g. using cp -ax /* .
, or maybe rsync -a /* .
or so) to the repo, and then use git annex add
? (Let's skip /dev
and maybe other special files for now.)
Let's say I added now all files to the annex.
I would also want to store the owning user, group, and access attributes, and maybe other extended attributes (ACL, xattr). This is not yet covered by Git Annex (by default), right? This could be stored as annex metadata. Or maybe better in some other way, because this would be per file path, and not per file content. Has anyone already done sth like this? It should not be too hard to do this, right?
I'm also not exactly sure how Git Annex handles symlinks. Would it store the original symlink? Or would it not handle them at all, and just add them to Git itself?
There will be some overlap of the files with other Git Annex repos (e.g. this could contain a subset of pictures I have elsewhere). I would want that the annexed data files are shared with my much bigger Annex repo which contains all my main data (pictures and lots of other stuff). This is actually the main reason why I consider using Git Annex as well for this purpose, and not some other solution, so that I don't need to store data separately, and get other benefits (to simplify my backups).
git and git-annex do not store a lot of filesystem metadata. git-annex metadata actually stores metadata attached to the file key, which means the metadata is attached to the file content not the file path. Filesystems attach metadata to the file location (within a file tree), so if you have two files with the same content but different permissions in different folders you couldn't represent that information using git-annex metadata.
You might checkout using the
git-annex
borg special remote. You could backup your whole linux system to a borg repository (using standard borg commands). Then you can add that borg repo as a git-annex borg special remote so you could access the files from a git-annex perspective.Yes, I know, but I was basically asking whether anyone has developed an extension already to store such meta data (per path, not content), or done sth similar. Or maybe you could also interpret it as a feature request. Or basically I was just curious whether it makes sense to add some feature like that. I guess this would not be too complicated. So I'm mainly curious whether there are other problems which I don't see right now, or if this is a good or bad idea in general.
Using the Borg special remote sounds like an interesting workaround.