2020-12-18 15:06:23 +00:00
|
|
|
This special remote type accesses annexed files stored in a
|
2020-12-17 17:12:35 +00:00
|
|
|
[borg](https://www.borgbackup.org/) repository.
|
|
|
|
|
2020-12-18 15:06:23 +00:00
|
|
|
Unlike most special remotes, git-annex cannot be used to store annexed
|
|
|
|
files in this special remote. You store files by using borg as usual, to
|
|
|
|
back up the git-annex repository. Then `git-annex sync` will learn about
|
|
|
|
the annexed files that are stored in the borg repository.
|
2020-12-17 17:12:35 +00:00
|
|
|
|
2020-12-28 20:23:38 +00:00
|
|
|
## setup example
|
|
|
|
|
|
|
|
# borg init --encryption=keyfile /path/to/borgrepo
|
|
|
|
# git annex initremote borg type=borg borgrepo=/path/to/borgrepo
|
|
|
|
# borg create /path/to/borgrepo `pwd`::{now}
|
|
|
|
# git annex sync borg
|
|
|
|
|
2020-12-17 17:12:35 +00:00
|
|
|
## configuration
|
|
|
|
|
|
|
|
These parameters can be passed to `git annex initremote` to configure the
|
|
|
|
remote:
|
|
|
|
|
2020-12-18 20:03:51 +00:00
|
|
|
* `borgrepo` - The location of a borg repository, eg a path, or
|
2020-12-17 17:12:35 +00:00
|
|
|
`user@host:path` for ssh access.
|
|
|
|
|
2020-12-23 17:02:13 +00:00
|
|
|
* `subdir` - The subdirectory within the borg repository where git-annex
|
|
|
|
should look for annex object files. The default is to look through the
|
|
|
|
whole borg repository.
|
|
|
|
|
|
|
|
This is useful to avoid learning about annex objects in the borg
|
|
|
|
repository that belong to unrelated git-annex repositories. It can also
|
|
|
|
make syncing faster.
|
|
|
|
|
2020-12-28 20:23:38 +00:00
|
|
|
* `appendonly` - You could use borg to delete content from the
|
|
|
|
repository at any time, so this defaults to "no", which
|
|
|
|
makes the remote be untrusted. If you set to "yes", you must
|
|
|
|
take care to avoid using commands like `borg delete` and
|
|
|
|
`borg prune` with the borg repository.
|
2020-12-18 15:06:23 +00:00
|
|
|
|
2020-12-28 20:23:38 +00:00
|
|
|
## avoid archive name reuse
|
|
|
|
|
|
|
|
Borg repositories contain archives, and git-annex assumes that, once
|
|
|
|
created, the content of an archive does not change. So if you delete an
|
|
|
|
archive and then create a new archive with the same name, it will confuse
|
|
|
|
git-annex about what is contained in the borg repository.
|