2015-03-23 19:36:10 +00:00
|
|
|
# NAME
|
|
|
|
|
|
|
|
git-annex mirror - mirror content of files to/from another repository
|
|
|
|
|
|
|
|
# SYNOPSIS
|
|
|
|
|
|
|
|
git annex mirror `[path ...] [--to=remote|--from=remote]`
|
|
|
|
|
|
|
|
# DESCRIPTION
|
|
|
|
|
|
|
|
This causes a destination repository to mirror a source repository.
|
|
|
|
|
|
|
|
Each specified file in the source repository is mirrored to the destination
|
|
|
|
repository. If a file's content is present in the source repository, it is
|
|
|
|
copied to the destination repository. If a file's content is not present in
|
|
|
|
the source repository, it will be dropped from the destination repository
|
|
|
|
when the numcopies setting allows.
|
|
|
|
|
|
|
|
Note that mirror does not sync the git repository, but only the file
|
2015-05-29 16:12:55 +00:00
|
|
|
contents. Use [[git-annex-sync]](1) for that.
|
2015-03-23 19:36:10 +00:00
|
|
|
|
|
|
|
# OPTIONS
|
|
|
|
|
|
|
|
* `--to=remote`
|
|
|
|
|
|
|
|
Use the local repository as the source repository, and mirror its contents
|
|
|
|
to the remote.
|
|
|
|
|
|
|
|
* `--from=remote`
|
|
|
|
|
|
|
|
Use the remote as the source repository, and mirror its contents to the local
|
|
|
|
repository.
|
|
|
|
|
2015-04-10 21:08:07 +00:00
|
|
|
* `--jobs=N` `-JN`
|
|
|
|
|
|
|
|
Enables parallel transfers with up to the specified number of jobs
|
|
|
|
running at once. For example: `-J10`
|
|
|
|
|
2019-05-10 17:24:31 +00:00
|
|
|
Setting this to "cpus" will run one job per CPU core.
|
|
|
|
|
2018-04-04 03:12:04 +00:00
|
|
|
* `--all` `-A`
|
2015-03-23 19:36:10 +00:00
|
|
|
|
|
|
|
Mirror all objects stored in the git annex, not only objects used by
|
|
|
|
currently existing files.
|
|
|
|
|
|
|
|
However, this bypasses checking the .gitattributes annex.numcopies
|
|
|
|
setting when dropping files.
|
|
|
|
|
2015-03-25 16:09:49 +00:00
|
|
|
This is the default behavior when running git-annex in a bare repository.
|
|
|
|
|
--branch, stage 1
Added --branch option to copy, drop, fsck, get, metadata, mirror, move, and
whereis commands. This option makes git-annex operate on files that are
included in a specified branch (or other treeish).
The names of the files from the branch that are being operated on are not
displayed yet; only the keys. Displaying the filenames will need changes
to every affected command.
Also, note that --branch can be specified repeatedly. This is not really
documented, but seemed worth supporting, especially since we may later want
the ability to operate on all branches matching a refspec. However, when
operating on two branches that contain the same key, that key will be
operated on twice.
2016-07-20 16:05:22 +00:00
|
|
|
* `--branch=ref`
|
|
|
|
|
|
|
|
Operate on files in the specified branch or treeish.
|
|
|
|
|
|
|
|
Like --all, this bypasses checking the .gitattributes annex.numcopies
|
|
|
|
setting when dropping files.
|
|
|
|
|
2016-08-03 16:37:12 +00:00
|
|
|
* `--unused`
|
|
|
|
|
|
|
|
Operate on files found by last run of git-annex unused.
|
|
|
|
|
|
|
|
* `--failed`
|
|
|
|
|
|
|
|
Operate on files that have recently failed to be transferred.
|
|
|
|
|
2021-08-25 18:20:33 +00:00
|
|
|
* matching options
|
2015-03-23 19:36:10 +00:00
|
|
|
|
|
|
|
The [[git-annex-matching-options]](1)
|
2021-08-25 18:20:33 +00:00
|
|
|
can be used to control what to mirror.
|
2015-03-23 19:36:10 +00:00
|
|
|
|
2016-09-09 20:24:26 +00:00
|
|
|
* `--json`
|
|
|
|
|
|
|
|
Enable JSON output. This is intended to be parsed by programs that use
|
2023-04-25 21:37:34 +00:00
|
|
|
git-annex. Each line of output is a JSON object.
|
2016-09-09 20:24:26 +00:00
|
|
|
|
2023-06-29 19:38:37 +00:00
|
|
|
Note that unlike all other commands that support `--json`, this command
|
|
|
|
outputs different types of json objects in different circumstances.
|
|
|
|
|
2016-09-09 20:24:26 +00:00
|
|
|
* `--json-progress`
|
|
|
|
|
|
|
|
Include progress objects in JSON output.
|
|
|
|
|
2018-02-19 18:28:17 +00:00
|
|
|
* `--json-error-messages`
|
|
|
|
|
2023-04-25 21:37:34 +00:00
|
|
|
Messages that would normally be output to standard error are included in
|
|
|
|
the JSON instead.
|
2018-02-19 18:28:17 +00:00
|
|
|
|
2021-05-10 19:00:13 +00:00
|
|
|
* Also the [[git-annex-common-options]](1) can be used.
|
|
|
|
|
2015-03-23 19:36:10 +00:00
|
|
|
# SEE ALSO
|
|
|
|
|
|
|
|
[[git-annex]](1)
|
|
|
|
|
2015-05-29 16:12:55 +00:00
|
|
|
[[git-annex-sync]](1)
|
|
|
|
|
2015-03-23 19:36:10 +00:00
|
|
|
# AUTHOR
|
|
|
|
|
|
|
|
Joey Hess <id@joeyh.name>
|
|
|
|
|
|
|
|
Warning: Automatically converted into a man page by mdwn2man. Edit with care.
|