git-annex-copy(1)
π NAME
git-annex-copy β copy the content of files to/from another repository π«Ά
β¨ SYNOPSIS β¨
git annex copy [path ...] [--from=remote|--to=remote]
π¦ DESCRIPTION π¦
Okay so bestie, here's the vibe: this command copies the content of files from or to another repository. That's it, that's the whole gig. Iconic, lowkey.
If you give it no parameters at all, it just operates on all annexed files in the current directory (main character behavior, honestly). But you can also point it at specific files or directories if you want to be picky β paths of files or directories to operate on can be specified. Slay.
πΈ OPTIONS πΈ
--from=remoteβ Copies the content of files from the specified remote into the local repository. Heads up though: any files that are not available on the remote will be silently skipped π like they simply didn't show up to the party.--to=remoteβ Copies the content of files from the local repository to the specified remote.--to=hereβ Copies the content of files from all reachable remotes into the local repository. Everything, everywhere, all at once π--from=remote1 --to=remote2β Copies the content of files that are in remote1 over to remote2. The way this actually works: it first downloads the content from remote1 to the local repository (if it's not already there), then sends it to remote2, and then deletes the content from the local repository if it was not present to start with. So it's giving middleman, but make it tidy π--from-anywhere --to=remoteβ Copies files to the remote from the local repository as well as from any reachable remotes. Best of both worlds, no cap.--jobs=N-JNβ Enables parallel transfers with up to the specified number of jobs running at once. For example:-J10πββοΈπ¨
Setting this to "cpus" will run one job per CPU core.
Note that when using --from with --to, twice this many jobs will run at once, evenly split between the two remotes. Double the chaos, double the fun.
--wanted-wβ Rather than copying all specified files, only copy those that are preferred content of the destination repository. Seegit-annex-preferred-content(1)for the whole lore.--autoβ Rather than copying all specified files, only copy those that don't yet have the desired number of copies, or that are preferred content of the destination repository. It's the chill "only if you actually need it" option β¨--fastβ When copying content to a remote, avoid a round trip to check if the remote already has content. This can be faster, but might skip copying content to the remote in some cases. So like, speed over certainty β your call, bestie β‘--all-Aβ Rather than specifying a filename or path to copy, this option can be used to copy all available versions of all files. Yes, all of them. This is the default behavior when running git-annex in a bare repository.--branch=refβ Operate on files in the specified branch or treeish πΏ--unusedβ Operate on files found by the last run ofgit-annex unused. The leftovers finally get their moment.--failedβ Operate on files that have recently failed to be transferred. Retry arc ππ--key=keynameβ Use this option to copy a specified key. Keys only, no filenames, we're being specific.- matching options β The
git-annex-matching-options(1)can be used to specify what to copy. Mix and match, go feral π --batchβ Enables batch mode, in which lines containing names of files to copy are read from stdin.
As each specified file is processed, the usual progress output is displayed. If a file's content does not need to be copied, or it does not match specified matching options, or it is not an annexed file, a blank line is output in response instead.
Since the usual output while copying a file is verbose and not machine-parseable, you may want to use --json in combination with --batch. (Trust me on this one.)
--batch-keysβ This is like--batchbut the lines read from stdin are parsed as keys.-zβ Makes batch input be delimited by nulls instead of the usual newlines. Little null gremlin energy π--jsonβ Enable JSON output. This is intended to be parsed by programs that use git-annex. Each line of output is a JSON object. Machine-readable and gorgeous.--json-progressβ Include progress objects in JSON output. Now your JSON also tells you how it's going π--json-error-messagesβ Messages that would normally be output to standard error are included in the JSON instead. No more stderr jumpscares.
Also the git-annex-common-options(1) can be used. Free real estate π
π SEE ALSO
π AUTHOR
Joey Hess <id@joeyh.name>
And that's the whole page bestie, brought to you by the git-annex-copy(1) manual page from the General Commands Manual β go forth and copy responsibly ππβ
π¦ where this page comes from
- alpine 3.24: git-annex-doc 10.20261026-r0 Β· AGPL-3.0-or-later
- arch rolling: git-annex 10.20261026-2 Β· AGPL-3.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms