|
google site
|
|||||||
| Forums | Register | Blog | Man Pages | Forum Rules | Links | Albums | FAQ | Users | Calendar | Search | Today's Posts | Mark Forums Read |
| 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. |
![]() |
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
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
|
|||
|
|||
|
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
|
|||
|
|||
|
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
|
|||
|
|||
|
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
|
|||
|
|||
|
thanks, i'll try
|
| Sponsored Links | ||
|
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
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 |