2011-04-28 00:06:07 +00:00
|
|
|
This special remote type rsyncs file contents to somewhere else.
|
|
|
|
|
|
|
|
Setup example:
|
|
|
|
|
2015-01-21 16:50:09 +00:00
|
|
|
# git annex initremote myrsync type=rsync rsyncurl=rsync://rsync.example.com/myrsync keyid=id@joeyh.name encryption=shared
|
2011-04-29 15:16:54 +00:00
|
|
|
# git annex describe myrsync "rsync server"
|
2011-04-28 00:06:07 +00:00
|
|
|
|
2011-04-28 13:45:32 +00:00
|
|
|
Or for using rsync over SSH
|
|
|
|
|
2015-01-21 16:50:09 +00:00
|
|
|
# git annex initremote myrsync type=rsync rsyncurl=ssh.example.com:/myrsync keyid=id@joeyh.name encryption=shared
|
2011-04-29 15:16:54 +00:00
|
|
|
# git annex describe myrsync "rsync server"
|
2011-04-28 13:45:32 +00:00
|
|
|
|
2011-04-28 00:06:07 +00:00
|
|
|
## configuration
|
|
|
|
|
|
|
|
These parameters can be passed to `git annex initremote` to configure rsync:
|
|
|
|
|
2014-08-03 19:07:43 +00:00
|
|
|
* `rsyncurl` - Required. This is the url or `hostname:/directory` to
|
|
|
|
pass to rsync to tell it where to store content.
|
|
|
|
|
2013-09-05 03:46:50 +00:00
|
|
|
* `encryption` - One of "none", "hybrid", "shared", or "pubkey".
|
|
|
|
See [[encryption]].
|
2012-11-19 21:32:58 +00:00
|
|
|
|
2013-09-05 03:46:50 +00:00
|
|
|
* `keyid` - Specifies the gpg key to use for [[encryption]].
|
2011-04-28 00:06:07 +00:00
|
|
|
|
2018-02-28 16:09:03 +00:00
|
|
|
* `exporttree` - Set to "yes" to make this special remote usable
|
|
|
|
by [[git-annex-export]]. It will not be usable as a general-purpose
|
|
|
|
special remote.
|
|
|
|
|
2012-05-02 17:08:31 +00:00
|
|
|
* `shellescape` - Optional. Set to "no" to avoid shell escaping normally
|
|
|
|
done when using rsync over ssh. That escaping is needed with typical
|
|
|
|
setups, but not with some hosting providers that do not expose rsynced
|
|
|
|
filenames to the shell. You'll know you need this option if `git annex get`
|
|
|
|
from the special remote fails with an error message containing a single
|
2013-04-26 22:22:44 +00:00
|
|
|
quote (`'`) character. If that happens, you can run enableremote
|
2012-05-02 17:08:31 +00:00
|
|
|
setting shellescape=no.
|
|
|
|
|
2014-08-03 19:07:43 +00:00
|
|
|
* `chunk` - Enables [[chunking]] when storing large files.
|
|
|
|
This is typically not a win for rsync, so no need to enable it.
|
|
|
|
But, it makes this interoperate with the [[directory]] special remote.
|
|
|
|
|
2019-03-22 13:59:56 +00:00
|
|
|
The `remote.name.annex-rsync-options` git configuration setting can be used
|
|
|
|
to pass parameters to rsync. To pass parameters to rsync only when it's
|
|
|
|
downloading and uploading, use `remote.name.annex-rsync-download-options`
|
|
|
|
and `remote.name.annex-rsync-upload-options`
|
2013-05-04 18:57:13 +00:00
|
|
|
|
|
|
|
## annex-rsync-transport
|
|
|
|
|
2019-03-22 13:59:56 +00:00
|
|
|
You can use the `remote.name.annex-rsync-transport` git configuration
|
|
|
|
setting to choose whether we run rsync over ssh or rsh. This setting
|
|
|
|
is also used to specify parameters that git annex will pass to ssh/rsh.
|
2013-05-04 18:57:13 +00:00
|
|
|
|
2019-03-22 13:59:56 +00:00
|
|
|
ssh is the default transport; if you'd like to run rsync over rsh:
|
2013-05-04 18:57:13 +00:00
|
|
|
|
2019-03-22 13:59:56 +00:00
|
|
|
git config remote.name.annex-rsync-transport rsh
|
2013-05-04 18:57:13 +00:00
|
|
|
|
|
|
|
To pass parameters to ssh/rsh, include the parameters after "rsh" or
|
|
|
|
"ssh". For example, to configure ssh to use the private key at
|
2019-03-22 13:59:56 +00:00
|
|
|
`/path/to/private/key`:
|
2013-05-04 18:57:13 +00:00
|
|
|
|
2019-03-22 13:59:56 +00:00
|
|
|
git config renote.name.annex-rsync-transport "ssh -i /path/to/private/key"
|