#200 Issue closed: RSYNC syntax: simplify (unify) the rule-sets

Labels: enhancement, documentation

gdha opened issue at 2013-02-07 12:47:

Currently we support the following syntax for BACKUP=RSYNC workflow:

#### rear needs a destination path which is the SRC (or DST)
# BACKUP_URL=[USER@]HOST:PATH                   # using ssh (no rsh)
# with rsync protocol PATH is a MODULE name defined in remote /etc/rsyncd.conf file
# BACKUP_URL=[USER@]HOST::PATH                  # using rsync
# BACKUP_URL=rsync://[USER@]HOST[:PORT]/PATH    # using rsync

However, the OUTPUT_URL=rsync://[USER@]HOST/PATH only support our general syntax (the same rules as in our NETFS stuff). By the way, the OUTPUT_URL only supports the ssh rule (of rsync).
This is confusing, and therefore, perhaps we better simplify it to NETFS rules?

wdpoorte commented at 2013-02-08 08:57:

I would suggest a similar structure as subversion:
rsync://[USER@]HOST[:PORT]/PATH # rsync protocol
rsync+ssh://[USER@]HOST[:PORT]/PATH # rsync over ssh protocol
Seems much clearer to me.

pavoldomin commented at 2013-02-08 09:20:

Worth adding, that BACKUP=RSYNC and protocol set as ssh:// would also use ssh as rsync protocol.

I like @wdpoorte suggestion. I could even imagine just rsync://... and rear will try both ssh & rsync protocol, which ever works first.

kpieth commented at 2013-02-09 12:30:

I think the URL should not differ from rsync Usage:
rsync [OPTION]... SRC [SRC]... [USER@]HOST::DEST
rsync [OPTION]... SRC [SRC]... rsync://[USER@]HOST[:PORT]/DEST

The ':' usages connect via remote shell, while '::' & 'rsync://' usages connect
to an rsync daemon, and require SRC or DEST to start with a module name.

BACKUP_URL=[user]@host:path # using the SSH protocol
BACKUP_URL=[user]@host::path # using the RSYNC protocol
BACKUP_URL=rsync://[user]@host/path # using the RSYNC protocol
BACKUP_URL=rsync://[user]@host[:port]::path # using the RSYNC protocol

gdha commented at 2014-02-10 09:21:

The RSYNC backup method is the only one in rear not following our BACKUP_URL methodology using a scheme keyword, and that is confusing. We should align this and follow our own standards.

From duplicity man-page:


using rsync daemon : rsync://user[:password]@host.com[:port]::[/]module/some_dir
using rsync over ssh (only key auth) : rsync://user@host.com[:port]/[relative|/absolute]_path

@pavoldomin using only the scheme keyword ssh for RSYNC over ssh is not a good idea as within duplicity ssh is a synonym for scp

@wdpoorte I do like the idea to also foresee using rsync over ssh (only key auth) : rsync+ssh://user@host.com[:port]/[relative|/absolute]_path

We should keep the current RSYNC definitions (at least 'till version 1.17) to avoid breaking current customers settings.

gdha commented at 2014-02-19 15:56:

We redesigned script prep/RSYNC/default/10_check_rsync.sh to accept the following:

# BACKUP_URL=[USER@]HOST:PATH           # using ssh (no rsh)
# with rsync protocol PATH is a MODULE name defined in remote /etc/rsyncd.conf file
# BACKUP_URL=[USER@]HOST::PATH          # using rsync

# BACKUP_URL=rsync://[USER@]HOST[:PORT]/PATH    # using ssh
# BACKUP_URL=rsync://[USER@]HOST[:PORT]::/PATH  # using rsync

We still need to adapt the documentation for the updated standard.

gdha commented at 2014-04-14 09:10:

documented in Release document

[Export of Github issue for rear/rear.]