Hi,
I have a repo on a server, my laptop, and a separate backup hard drive. In the repo I have many small files as well as several very large files that are present in several versions. I want to set up my repos such that my backup hard drive has everything on it, my server has only the most recent version of the large files (the server is shared, so I don't want to hog disk space), and my laptop doesn't keep annexed files locally.
I think I can probably achieve what I want for the hard drive with
git annex wanted harddrive standard
git annex group harddrive backup
and for the laptop with
git annex wanted laptop standard
git annex group laptop incrementalbackup
but I haven't been able to figure out how to setup the server so it keeps the current copy of large files but not their old versions. Do you have any suggestions? Alternatively, I might be able to do it manually, but haven't been able to figure out how to specifically drop old versions of a file, so I would be open to suggestions on that front too.
Thanks! -Jack
git-annex wanted server "include=*"
The straightforward way to do this is to run periodically on the hard drive:
If you're using
git-annex sync --content
, you need to use--all
in order for it to consider unused content. Otherwise it will only operate on files in the current branch, and leave other content as-is. And you will need to rungit-annex unused
still.If you are using the assistant, it does periodically scan for unused content and moves them to some repository whose preferred content matches them.
You're right that using the "backup" standard group will make the hard drive want the unused content. That's because it wants "
anything
", which matches files whether they are unused or not.Any preferred content expression that matches on a filename, like "
include=*
", makes it not want unused content, which has no filename.Or, you can use "
not unused
" in a preferred content expression to explicitly exclude the unused content.