Hello,
I went through several of the questions on the forum but could not find the answer to this. I have the following scenario, which seems very similar to the nomad case.
I have a server at home with many big media files. I want to keep a subset of these files on my laptop, to watch when I travel. When I'm done watching the files, I want to either delete them (i.e, they should no longer be on any machine) or archive them (i.e., they should remain on the server, but no longer be on the laptop). I think I know how to do this from the command line, but I still have a few questions.
- How do I drop a file from every repository? If I understood correctly,
git annex drop foo
will only drop foo locally. - Is it possible to follow this use case using the assistant, or should I use the command line instead (which would be very fine with me)? In particular, how do I choose the file I want to put on the laptop? (It seems
git annex get
is the command line way, is there an assistant equivalent?) - Can I use both the assistant and the command line at the same time? Is there a description of the command-line version of what the assistant is doing behind the scenes?
- Can the server repository be both a "transfer" repository (to hold the files I haven't watch) and an "archive" repository (to keep the files I've watched and decided to keep), or do I need two repositories (on the server) for that?
Thanks a lot for any suggestion.
You can use
git annex drop foo --from remote
to drop the file from the remote. Of course, the remote has to be accessible. You can't drop files from an offline drive that's stored in a safe..What you might be looking for is
git annex drop foo; rm foo
, followed by a git commit, and then later you can rungit annex unused
on a remote and it will let you then easily drop the files you've removed from the repository. This approach of just deleting files when you're done with them also works when using the assistant.The assistant isn't really about only keeping a subset of files on your laptop. It would like to get them all, except for ones in "archive" directories. You can configure the assistant to use manual mode, and then it doesn't download any files on its own (so you have to manually
git annex get
them), but it will still handle all the other stuff the assistant does, like automatically committing and syncing changes.An archive repository wants one copy of every file that is not already stored in some other archive repository. So an archive repository could certainly be used instead of a transfer repository. (But not a small archive repository; those only want files that are moved to "archive" directories.) A better choice might be to make that server be a backup repository. That makes it want every file, no matter what, and it follows that it would archive everything, and have everything the client wants available for transferring to it.