Debian Local MirrorFor organizations with many Debian machines, setting up a local mirror maybe a good idea to save Internet bandwidth and ensure consistency. This involves dedicating a section of the local web server as the mirror, setting updates of the mirror on a daily basis and pointing the local Debian machines to the mirror.
For those with the resources - bandwidth and disk-space, you can contribute by creating a push mirror. This will allow everyone inside and outside your organization to access your web-server as an official Debian mirror. Registration with Debian is required, see reference for details.
Always make proper backup before proceeding.
Please report problems and direct all inquiries to Contact US.
From the World Wide Mirror Site list on Debian, find a primary or secondary push server.
Edit anonftpsync with your favourite editor.
Change the file permission mode.
# chmod 744 annoftpsync
Run annoftpsync. You don't need to be root to run this script.
Suggestion - run the program in the background with "No Hang Up" will free you to to close your ssh session as the job may take a few days to complete depending on your bandwidth.
nohup job & | | | +----- run in background. +--------------- don't stop after terminal session is close.
$ nohup anonftpsync
After a successful completion, a utc date will be the content of a file in "../project/trace/<hostname>" under the mirror directory.
After the initial download, the local mirror will need to be resync every so often. Schedule an update at most once a day, less frequent update is recommended. Security updates can be specified separately. Schedule the annoftpsync in the crontab with the proper user id.
Setup your local apache web server with a link to the mirror directory.
Check using your browser. If you can see the mirror contents, iit works, test the local repository by replacing the sources.list in the Debian clients with the local mirror address.