Slackware Ports
Slackware Logo

News

Security Advisories

FAQ

Book

General Info

Get Slack

Install Help

Configuration

Packages

ChangeLogs

Propaganda

Ports

Other Sites

Support

Contact

Mailing Lists

About

 
Getting the Alpha Port With rsync
So you'd like to keep a local copy of the Slackware FTP site on your local machine? You will need a few things before you can do that. You'll need a copy of the rsync program. It's available in the rsync.tgz package, in the N series. You'll also need a good amount of disk space. If you only want to mirror one particular release, you will need between one and two gigs of disk space. If you want to mirror everything, you're going to need at least ten gigs. Also, you'll need a network connection of some reasonable speed. It doesn't need to be ultra-fast, but a 33.6 modem is probably going to be painful.

First, you'll want to make a place on your machine to store the distribution tree. For the purpose of this example, we will assume that you want the root of your local copies to be /dest. That means that if you wanted to sync down the Alpha port, it would be in /dest/alpha. Or if you wanted to sync down the Slackware-4.0 release, it would be in /dest/slackware-4.0.

Now, let's see what's available for rsyncing on sourceforge. cd into your destination directory and type:

rsync download.sourceforge.net::


This will give you a listing of all the modules that are available. Among these, you will see "slackware" listed. That's the module you are interested in. If you now run rsync like so:

rsync download.sourceforge.net::slackware


You will see a listing of all the directories on the Slackware FTP site. Chances are you do not want to mirror the entire site, as that would take up a whole lot of disk. Let's assume that you just wanted to keep a local copy of the Alpha port. You would do that with the following rsync command line (it's a single command line, even if your browser shows it as two):

rsync --progress --delete -lprtvvz download.sourceforge.net:slackware/alpha .


Note the trailing period - that's important. That command line will tell rsync to pull down the entire /slackware/alpha directory from the FTP site and put it into the current directory. That's why you change to /dest first. You could also specify a directory to put it into if you'd like.

So what about all those options? --progress is fairly straightforward. --delete tells rsync to remove things from the local copy that have been removed. That helps to keep your copy identical to the main site, instead of just leaving everything around that we have removed. -vv means very verbose. It's not strictly required, but you might enjoy watching what's happening. -z enables compression, which will make things go a little faster. And finally, -lprt preserves symlinks, permissions and ownerships, and timestamps. The -t is especially important.

If you wanted to get the -current tree for Intel, all you would have to do is replace "/alpha" on the previous command with "/slackware-current". That part after the module name can be any valid path on the Slackware FTP site. If you wanted to keep the entire site mirrored locally, you could just leave off the firectory entirely.

The first time you rsync from the FTP site, it will take a long time to copy everything over. However, every time after that, all you will get is whatever has changed since last time you ran rsync. Unless we've made some major changes, that shouldn't be too much stuff. You could even place your favorite rsync command into a crontab to keep things updated automatically.

So what can you do with everything now that you've got a local copy? Well, you've got the source and build scripts that we use. So you could build packages from source if that's what you are into. You've also got all the packages, so you could upgrade and install things onto your system from the local copy. You could use it to make ISO images for burning to CD, or as an NFS server for doing installs onto other machines. What I'm trying to say is that a local copy of the FTP site can be incredibly useful.

Also, check out the rsync man page. It has a whole lot more options than have been explained here. You might find some of them useful.

Slackware™ is a trademark of Patrick Volkerding.