ianw1974 Posted July 5, 2006 Report Share Posted July 5, 2006 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? Quote Link to comment Share on other sites More sharing options...
aioshin Posted July 5, 2006 Report Share Posted July 5, 2006 try rsync -auv --delete source destination archive update verbose delete that works on mine Quote Link to comment Share on other sites More sharing options...
ianw1974 Posted July 5, 2006 Author Report Share Posted July 5, 2006 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. Quote Link to comment Share on other sites More sharing options...
Qchem Posted July 5, 2006 Report Share Posted July 5, 2006 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. Quote Link to comment Share on other sites More sharing options...
ianw1974 Posted July 5, 2006 Author Report Share Posted July 5, 2006 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. Quote Link to comment Share on other sites More sharing options...
ianw1974 Posted July 5, 2006 Author Report Share Posted July 5, 2006 Well, I've found the problem. If I read the man page properly, I would have answered my own question, duh! 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 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.