https://bugzilla.samba.org/show_bug.cgi?id=4621


tkessler@ucdavis.edu changed:

What |Removed |Added
----------------------------------------------------------------------------
CC| |tkessler@ucdavis.edu




------- Comment #2 from tkessler@ucdavis.edu 2008-07-12 12:01 CST -------
This would be an EXCEPTIONALLY useful command/option to have implemented in
rsync. I am currently trying to implement a backup system which writes to an
available module called "rsyncbackup" on an rsync server. I want this module to
be writable via rsync, but have it be read-only through SMB and other file
server protocols. I use the following command to invoke rsync:

rsync -rtglv --delete --delete-after --delete-excluded --progress --backup
--backup-dir=../../backups/$HOSTNAME/$DAYDATE/$HOURMINSEC/ ~/$USERNAME
server.domain.name::rsyncbackup/$USERNAME/current/$HOSTNAME

In my rsyncd.conf file, I have this entry for the "rsyncbackup" module:

[rsyncbackup]
path = /Volumes/Burns1/rsyncbackup
hosts allow = ip_address
list = true
exclude from = /Volumes/Burns1/rsyncbackup/info/rsyncexclude.txt
auth users =
use chroot = yes
uid = serveradmin
gid = backupgrp
read only = false
write only = true
comment = rsync backup directory

The "rsyncbackup" folder itself is given these permissions:
serveradmin: read & write
backupgrp: read only
others: none

The "rsyncbackup" destination module starts out empty, and when I run the
command on a client computer it gives an error such as:

rsync: mkdir "username/current/hostname" (in rsyncbackup) failed: No
such file or directory (2).

All paths in the rsyncd.conf file exist, and the command works very well if I
leave out the "current/$HOSTNAME" part, but defining nonexistent subfolders to
back up to causes this error and rsync doesnt continue. The only way around is
to manually create the folders.

It appears that rsync is invoking the "mkdir" command without the "-p" option,
which limits its folder creation to only one directory, instead of allowing it
to create a tree of directories. It would be exceptionally useful if rsync
would supply the "-p" option to the mkdir command so it will create a new tree
of folders and use that as the backup destination. Currently, I have to work
around this by sharing the rsync module with read and write permissions, and
have the command run on client computers via SMB to transfer files to the
server (bypassing the rsync server and using samba file sharing instead as the
means for transfer).


--
Configure bugmail: https://bugzilla.samba.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug, or are watching the QA contact.
--
Please use reply-all for most replies to avoid omitting the mailing list.
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html