Discussion:
cygwin - rsync question
Dan Miller
2010-09-04 16:30:16 UTC
Permalink
I'm running windows XP
Cygwin with latest updates

I have a bash script that sets up a directory structure for rsync to
perform incremental backups. It all works fine locally.

I'd like to use the same approach to backup my local files to a windows
network share on a server.

I have the windows network share mounted by /etc/fstab to a directory in
my root folder. Cygwin can read and create/delete files and directories
on the mount point but when I execute an rsync command from the script
it contacts the daemon and begins to send the file list but then it fails.

error is

rsync: read error: Software caused connection abort (113).

I also get a mkdir and chroot error if I try to save backup copies
within rsync.

it seems the rsync instance doesn't have appropriate permissions on the
mounted network share.

Is there a workaround for this ....? the way I mount the share in
/etc/fstab perhaps?

current mount looks like this:

//networkshare/backup/daily /backups smbfs user,posix=0,noacl

thanks in advance for any help.

Dan
Steven Monai
2010-09-04 17:48:23 UTC
Permalink
Post by Dan Miller
I'm running windows XP
Cygwin with latest updates
I have a bash script that sets up a directory structure for rsync to
perform incremental backups. It all works fine locally.
I'd like to use the same approach to backup my local files to a windows
network share on a server.
I have the windows network share mounted by /etc/fstab to a directory in
my root folder. Cygwin can read and create/delete files and directories
on the mount point but when I execute an rsync command from the script
it contacts the daemon and begins to send the file list but then it fails.
Something doesn't quite make sense here. If you have the network share
mounted in your local filesystem, then rsync should not be contacting a
remote daemon, since both the source and destination are local. What is
the command-line you are using to invoke rsync?
Post by Dan Miller
error is
rsync: read error: Software caused connection abort (113).
I also get a mkdir and chroot error if I try to save backup copies
within rsync.
Again, what is the rsync command-line that causes this?
Post by Dan Miller
it seems the rsync instance doesn't have appropriate permissions on the
mounted network share.
Is there a workaround for this ....? the way I mount the share in
/etc/fstab perhaps?
You mentioned that you *are* able to access files on the network share.
So it is unlikely that rsync would be specifically denied access by some
setting in your fstab. My suspicion is that you are invoking rsync
incorrectly, but, unfortunately, you neglected to state your commands.
Post by Dan Miller
//networkshare/backup/daily /backups smbfs user,posix=0,noacl
thanks in advance for any help.
-SM
--
Dan Miller
2010-09-04 18:46:44 UTC
Permalink
Hi Steven,

Thanks for taking the time to think about this. You are correct the
rsync daemon is running locally, and the network share is mounted
locally, my thought (which as you say could be entirely wrong) was that
the local rsync daemon doesn't seem to have the correct permissions to
modify the mounted local share. Again, if I run the script locally on a
local file and back it up to another drive on the local machine,
everything works perfectly, it's only when I try to modify a mounted
share that I get errors.

rsyncd.conf

use chroot = true
strict modes = false
log file=/cygdrive/c/Datafiles/batch_jobs/log_files/rsync.log


[backups]
path = /backups
comment = Dan's Offsite storage area (requires authentication)
read only = false


and the command to invoke rsync in my script is as follows

BDIR9 =/cygdrive/c/data
BSERVER =localhost
ROOTBKUP =daily
EXCLUDES=/home/dan/excluded_files.txt

OPTS="-avv --no-g --no-p --chmod=ugo+rwX --modify-window=1 --delete
--delete-excluded --exclude-from=$EXCLUDES --link-dest=../daily.1"

rsync $OPTS $BDIR9 $BSERVER::backups/$ROOTBKUP/daily.0

thanks again

Dan
Post by Steven Monai
Post by Dan Miller
I'm running windows XP
Cygwin with latest updates
I have a bash script that sets up a directory structure for rsync to
perform incremental backups. It all works fine locally.
I'd like to use the same approach to backup my local files to a windows
network share on a server.
I have the windows network share mounted by /etc/fstab to a directory in
my root folder. Cygwin can read and create/delete files and directories
on the mount point but when I execute an rsync command from the script
it contacts the daemon and begins to send the file list but then it fails.
Something doesn't quite make sense here. If you have the network share
mounted in your local filesystem, then rsync should not be contacting a
remote daemon, since both the source and destination are local. What is
the command-line you are using to invoke rsync?
Post by Dan Miller
error is
rsync: read error: Software caused connection abort (113).
I also get a mkdir and chroot error if I try to save backup copies
within rsync.
Again, what is the rsync command-line that causes this?
Post by Dan Miller
it seems the rsync instance doesn't have appropriate permissions on the
mounted network share.
Is there a workaround for this ....? the way I mount the share in
/etc/fstab perhaps?
You mentioned that you *are* able to access files on the network share.
So it is unlikely that rsync would be specifically denied access by some
setting in your fstab. My suspicion is that you are invoking rsync
incorrectly, but, unfortunately, you neglected to state your commands.
Post by Dan Miller
//networkshare/backup/daily /backups smbfs user,posix=0,noacl
thanks in advance for any help.
-SM
--
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Dan Miller
2010-09-04 20:40:30 UTC
Permalink
Thanks again for thinking about this Steven,

I was able to get it working by going into services on windows and
changing the Log On option for rsync from "Local System account" to
"This account" and entering my logon and password there.

Dan
Post by Steven Monai
Post by Dan Miller
I'm running windows XP
Cygwin with latest updates
I have a bash script that sets up a directory structure for rsync to
perform incremental backups. It all works fine locally.
I'd like to use the same approach to backup my local files to a windows
network share on a server.
I have the windows network share mounted by /etc/fstab to a directory in
my root folder. Cygwin can read and create/delete files and directories
on the mount point but when I execute an rsync command from the script
it contacts the daemon and begins to send the file list but then it fails.
Something doesn't quite make sense here. If you have the network share
mounted in your local filesystem, then rsync should not be contacting a
remote daemon, since both the source and destination are local. What is
the command-line you are using to invoke rsync?
Post by Dan Miller
error is
rsync: read error: Software caused connection abort (113).
I also get a mkdir and chroot error if I try to save backup copies
within rsync.
Again, what is the rsync command-line that causes this?
Post by Dan Miller
it seems the rsync instance doesn't have appropriate permissions on the
mounted network share.
Is there a workaround for this ....? the way I mount the share in
/etc/fstab perhaps?
You mentioned that you *are* able to access files on the network share.
So it is unlikely that rsync would be specifically denied access by some
setting in your fstab. My suspicion is that you are invoking rsync
incorrectly, but, unfortunately, you neglected to state your commands.
Post by Dan Miller
//networkshare/backup/daily /backups smbfs user,posix=0,noacl
thanks in advance for any help.
-SM
--
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Loading...