rsync and slackware-current
I like to keep a fairly fresh mirror of slackware-current on my network, for various reasons. I noticed that over a short period of time, the iso I create from it has gotten too big to fit on a CD. I started digging and the reason became quickly obvious. My mirror has all versions of every file since I started rsync'ing! Is there a way to update slackware-current without having to blow away my entire mirror every time I want to get in sync?
An example: aaa_lib_2.4.26_1.tgz aaa_lib_2.4.26_2.tgz aaa_lib_2.4.26_3.tgz are all updates of the same libs. How can I just update what's there to the latest, keeping only the latest file (and filename) This would save me lots of bandwidth as well, because only the differences would be brought over with rsync vs. the entire file. |
Use the "--delete" option with rsync. It will clean up the old files.
|
It'll do this with files with different names? How does it know one is a replacement for the other?
|
zulik@localhost:~$ cat /home/data/skrypty/upd
#!/bin/bash rsync -arvvP --delete ftp.slackware.at::slackware/slackware-current/slackware /home/data/swaret ln -s /home/data/swaret/slackware/FILE_LIST /home/data/swaret/slackware/FILELIST.TXT swaret --update |
With the "--delete" option, rsync simply makes it a real mirror of the site you are mirroring. Without it you are leaving old files on your hd.
It checks if there is local files that not exist on the remote site, and delete them if there is. And ofcourse otherwise. [root@*] [~]# more /usr/local/sbin/mirrorslackware rsync -a -v --delete rsync://rsync.slackware.no/slackware/slackware-current /home/ftp/pub/mirrors/slackware/ Works fine. |
Quote:
Works fine !? Trust me "ln -s" between FILE_LIST and FILELIST.TXT is necessery |
Quote:
Actually I am mirroring from slackware.no likewise and using --delete option and few daya ago someone on that server deleted complete slackware-current directory and rsync deleted everything from my disk also....:( Pretty frustrating.....$@#%@#^%$#$^@...damn I am keeping two repositories on my HD now |
Quote:
|
Quote:
|
Quote:
position nr 3 1: look at my script ( I'm downloading only ftp.slackware.at/slackware-current/slackware/) not all file from ftp://ftp.slackware.at/slackware-current/ 2: swaret use FILELIST.TXT |
Ah, but I'm mirroring the whole slackware-current :-)
|
So on seriously, why you need the whole ?
|
I'm creating my own installcd's now and then, based on the current version, but heavy modifyed by myself.
|
Quote:
|
All times are GMT -5. The time now is 08:41 PM. |