rsync trailing slash vs not to trailing slash

Status
Not open for further replies.

Oko

Contributor
Joined
Nov 30, 2013
Messages
132
I am using rsync to backup one of my FreeNAS 9.2.1.9 boxes due to the frequent crashes of the target machine caused by
ZFS replication. It turns out that crashes are caused by faulty logic of the SAS back plane but that is another story.

Long story short. I have done initial rsync from FreeNAS box onto the remote host and I would like to use GUI now to set up rsync cron jobs. Little that I experimented with FreeNAS rsync module it seems to me that the module is not using trailing slash which is equivalent to

Code:
rsync /mnt/storage/Documents rsync://nobody@remotehost:873/ftp 


where ftp is defined in ryncd.conf

Code:
uid = nobody
gid = nobody
use chroot = no
max connections = 4
syslog facility = local5
[ftp]
        path = /data/Documents
        read only = no
        list = yes
        comment = data

which in turn created another Documents directory so I ended up with

Code:
/backups/Documents/Documents


I actually would like to do

Code:
rsync /mnt/storage/Documents/ rsync://nobody@remotehost:873/ftp 


which will leave me with

Code:
/backups/Documents


only.
 

willnx

Dabbler
Joined
Aug 11, 2013
Messages
49
Dumb question, but why can't you define the path within the rsync config to be '/data'? Then when you run your rsync job, it'll make '/backups/Documents'.
 

Oko

Contributor
Joined
Nov 30, 2013
Messages
132
Dumb question, but why can't you define the path within the rsync config to be '/data'? Then when you run your rsync job, it'll make '/backups/Documents'.
Because I have

/data/Documents

and I have another data set

/data/misc

and I am using option --delete to remove the files which don't exist on the machine which I am trying to backup.
 
Status
Not open for further replies.
Top