LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 10-06-2009, 05:01 AM   #1
saghi
LQ Newbie
 
Registered: Sep 2008
Posts: 28

Rep: Reputation: 15
rsync error


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
 
Old 10-06-2009, 05:44 AM   #2
lutusp
Member
 
Registered: Sep 2009
Distribution: Fedora
Posts: 835

Rep: Reputation: 102Reputation: 102
Quote:
Originally Posted by saghi View Post
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.
 
Old 10-06-2009, 05:53 AM   #3
saghi
LQ Newbie
 
Registered: Sep 2008
Posts: 28

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by lutusp View Post
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.
I run this script as root!!
 
Old 10-06-2009, 05:56 AM   #4
lutusp
Member
 
Registered: Sep 2009
Distribution: Fedora
Posts: 835

Rep: Reputation: 102Reputation: 102
Quote:
Originally Posted by saghi View Post
I run this script as root!!
You must possess root authority on both ends of the transaction. If you did, the error would not have happened.
 
Old 10-06-2009, 11:44 PM   #5
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,359

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
This
Code:
echo "Completed at: `/bin/date`" > $LOGFILE
should be
Code:
echo "Completed at: `/bin/date`" >> $LOGFILE
else it overwrites the file.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
error with rsync DJE007 Linux - Networking 3 09-20-2009 11:51 PM
rsync error? anon091 Linux - Newbie 1 09-14-2009 03:28 PM
rsync error: IO error encountered - skipping file deletion lwainscott Linux - General 1 08-21-2009 12:15 PM
rsync error sohail0399 Linux - Newbie 1 07-21-2009 05:47 AM
rsync error irvken Linux - Software 5 04-24-2005 04:12 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 05:28 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration