Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Advanced & Expert Users
google site



UNIX for Advanced & Expert Users Expert-to-Expert. Learn advanced UNIX, UNIX commands, Linux, Operating Systems, System Administration, Programming, Shell, Shell Scripts, Solaris, Linux, HP-UX, AIX, OS X, BSD.

Closed Thread
English Japanese Spanish French German Portuguese Italian Powered by Powered by Google
 
Thread Tools Search this Thread Display Modes
  #1  
Old 12-29-2009
Registered User
 

Join Date: Dec 2009
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
rsync deletes original directory

Hi

I have a strange problem. Sometimes when I execute the below command something wierd happens.

Code:
rsync -avz -e ssh travegre@travegre.net: ../travegre.net/

the folder named "hm" that is held in travegre.net and is coppied along with all the other folders and data at travegre.net, gets deleted or better yet, the name of the folder is still there but is changed to "hm@" as a link which points to nothing. When I looked at the output of rsync the last time this happened (it doesn't happen on every run of rsync but has happened many times now) I found this strange:

Code:
rsync: delete_file: rmdir "/home/travegre.net/hm" failed: Directory not empty (39)

"/home/travegre.net/" is the directory to which I copy files, so I don't understand why rsync would want to delete it at any point, moreover, why delete only the directory "hm" and above all, why all this problems always just with this directory, as if it was special in some way? But in the end, as I said, the directory in the destination is intact and the one in the source server gets ruined.

This problem has been bugging me for long time and I didn't find any answer on the web so if someone has any idea or a hint as to solution to this problem I would be very grateful, also tell me if I have to post this question somewhere else as I'm quite new here.

Thanks in advance

Gregor Traven

Last edited by Yogesh Sawant; 12-30-2009 at 12:27 AM.. Reason: added code blocks
Sponsored Links
  #2  
Old 01-05-2010
Registered User
 

Join Date: May 2009
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
That is strange.

All I can think of is rsync getting the source and destination confused.

Are you specifying any of the --delete , --delete-before, --delete-during, --delete-after options by any chance?
  #3  
Old 01-05-2010
Registered User
 

Join Date: Dec 2009
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
no, just the: rsync -avz -e ssh travegre@travegre.net: ../travegre.net/

Would it be better if I do specify one of these, would that help him get it right?
  #4  
Old 01-11-2010
Registered User
 

Join Date: May 2009
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
You might try using an absolute instead of relative path.

Since you're mixing ssh in with that it's a bit beyond my knowledge.
  #5  
Old 01-11-2010
Registered User
 

Join Date: Dec 2009
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
thanks, i'll try
Sponsored Links
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
Trackbacks are On
Pingbacks are On
Refbacks are Off


More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
tar command dont tar to original directory borderblaster Shell Programming and Scripting 1 10-16-2009 05:55 AM
rsync mirror of download directory wskibum Shell Programming and Scripting 2 04-29-2009 10:54 AM
Shell Program which deletes all lines ... abhiseknitd Shell Programming and Scripting 4 07-16-2008 10:47 AM
rsync: taking advantage of files in different directory other than destination rssrik UNIX for Advanced & Expert Users 1 05-06-2008 07:35 AM
Multi line deletes rehoboth UNIX for Dummies Questions & Answers 5 10-18-2002 03:39 PM



All times are GMT -4. The time now is 07:49 AM.