[rhn-users] Error running rsync

Jody Cleveland Cleveland at winnefox.org
Tue Aug 2 16:23:07 UTC 2005


Hello,

I've got a script that uses rsync to backup files from my redhat 3.0AS
server, to a windows server. I've got the script below.

I run this script as a cron job every night as root. For results, I get
errors like these:

chown MailScanner/bayes/bayes_toks : Operation not permitted
failed to set permissions on MailScanner/bayes : Operation not permitted
rsync error: some files could not be transferred (code 23) at
main.c(620)
chown local/man/man8 : Operation not permitted
chown local/man/man8/cdcc.8 : Operation not permitted
chown local/man/man8/dbclean.8 : Operation not permitted

There are more, but they're all similar. If this is running as root, why
would I get these errors?

Here's the script:

#!/bin/sh
#/usr/local/bin/rsync_backup.sh

echo "Mounting backup drive."
mount -t smbfs -o username=samba,password=haluser2c //blob/destiny
/mnt/blob

#point (directory)
#delete or comment out mount line above if backup drive
#permanently mounted.

echo "Executing incremental backup script"

echo "Backing up /bin"
rsync -aH --exclude-from=/home/cleveland/rsync_exclude --delete-after
--progress /bin/ /mnt/blob/bin/

echo "Backing up /etc"
rsync -aH --exclude-from=/home/cleveland/rsync_exclude --delete-after
--progress /etc/ /mnt/blob/etc/

echo "Backing up /home"
rsync -aH --exclude-from=/home/cleveland/rsync_exclude --delete-after
--progress /home/ /mnt/blob/home/

echo "Backing up /lib"
rsync -aH --exclude-from=/home/cleveland/rsync_exclude --delete-after
--progress /lib/ /mnt/blob/lib/

echo "Backing up /misc"
rsync -aH --exclude-from=/home/cleveland/rsync_exclude --delete-after
--progress /misc/ /mnt/blob/misc/

echo "Backing up /opt"
rsync -aH --exclude-from=/home/cleveland/rsync_exclude --delete-after
--progress /opt/ /mnt/blob/opt/

echo "Backing up /root"
rsync -aH --exclude-from=/home/cleveland/rsync_exclude --delete-after
--progress /root/ /mnt/blob/root/

echo "Backing up /sbin"
rsync -aH --exclude-from=/home/cleveland/rsync_exclude --delete-after
--progress /sbin/ /mnt/blob/sbin/

echo "Backing up /usr"
rsync -aH --exclude-from=/home/cleveland/rsync_exclude --delete-after
--progress /usr/ /mnt/blob/usr/

echo "Backing up /var"
rsync -aH --exclude-from=/home/cleveland/rsync_exclude --delete-after
--progress /var/ /mnt/blob/var/

# unmount the backup directory on blob
umount /mnt/blob

--
Jody Cleveland
Computer Support Specialist
cleveland at winnefox.org




More information about the rhn-users mailing list