Quote:
Originally Posted by saghi
hi every one
i have a script to mirror one path from server 10.0.4.20 to 10.0.4.19
my scrypt is :
SOURCEPATH='/u01/'
DESTPATH='/u01/'
DESTHOST='10.0.4.19'
DESTUSER='root'
LOGFILE='/root/rsync.log'
echo `date`
echo $'\n\n' >> $LOGFILE
rsync -av --delete --exclude '/u01/app' --exclude '/u01/nfs.cp' --exclude '/u01/symbols.jar' --exclude '/u01/Ssymbols.jar' --exclude '/u01/rar' --exclude '/u01/.bash_history*' --rsh=ssh $SOURCEPATH $DESTUSER@$DESTHOST:$DESTPATH 2>&1 >> $LOGFILE
echo "Completed at: `/bin/date`" > $LOGFILE
but when i run this script i faced to below error:
rsync: rename "/u01/..bash_history.gDvgzT" -> ".bash_history": Operation not permitted (1)
rsync error: some files could not be transferred (code 23) at main.c(702)
but really the ""/u01/..bash_history.gDvgzT" is not exist.
and every time in run this script i faced to this error but the filename is changed.
rsync: rename "/u01/..bash_history.eeoJF6"-> ".bash_history": Operation not permitted (1)
rsync error: some files could not be transferred (code 23) at main.c(702)
could anyone help me on this error?
thank
saghi
|
When you run rsync, it must have permission to read and write all the files in the path on both ends of the connection. The error you report comes up when it doesn't.
Long story short, you need to run rsync as root. But
be careful and understand the implications.