Jump to content

rsync problem with old files [solved]


ianw1974
 Share

Recommended Posts

I'm using rsync to synchronise a Mandriva mirror. It's working perfectly fine, but I have everything, including old versions of files.

 

I believe there is a parameter I can use which deletes files not on my machine that aren't on the host. I checked the host, and the files exist, but the parameter I'm using doesn't seem to work. I've currently got:

 

rsync -r --delete mirror stuff here my directory here

 

and it doesn't seem to delete. I think maybe I'm doing something wrong, any ideas as to what I'm missing?

Link to comment
Share on other sites

Doesn't the archive permission preserve permissions only? If so, maybe I could just not use this and just the "u" parameter instead. I use "r" for recursive, do I need this too?

 

Incidently, how does the exact format of you line look? Here is mine:

 

rsync -r --delete rsync://anorien.csc.warwick.ac.uk/Mandriva/official/updates/2006.0/main_updates/* /home/ftp/pub/
mirrors/mandriva/updates/

 

I'm just wondering if my source/destination format is wrong as well.

Link to comment
Share on other sites

I'm just wondering if my source/destination format is wrong as well.

 

It's a long time since I've used rsync, but I think the problem may be with your source format. Try this:

 

anorien.csc.warwick.ac.uk:Mandriva/official/updates/2006.0/main_updates/

 

 

Note, I've no idea if the host is running an rsync service or not.

Link to comment
Share on other sites

It's running, I'm currently rsync'ing without any problems other than these, I'll try a different format to see if that does the trick.

Link to comment
Share on other sites

Well, I've found the problem. If I read the man page properly, I would have answered my own question, duh! :lol2:

 

Right, here it is. The reason it fails is because of my source having the * at the end of the line. You have to have it to pull the full directory, so removing the * solved the problem. My script now reads:

 

rsync -r --delete rsync://anorien.csc.warwick.ac.uk/Mandriva/official/updates/2006.0/main_updates/ /home/ftp/pub/
mirrors/mandriva/updates/

 

and it's now working fine :P

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...