Weblog entry #10 for lee
If you track unstable, then unless you run "apt-get clean", your apt cache (/var/cache/apt/archives/) will fill with downloaded debian packages. apt-move takes the files in the archives considered current and organises them into a repository that is apt accessible.
This directory can then be added to your local sources list, but you can also dump these repositories to CD or DVD and use them a supplementary CD sources during an installation process.
Firstly, set up the archive with "mkdir -p /srv/mirrors/debian/.disk" then configure apt-move via /etc/apt-move.conf to use LOCALDIR=/srv/mirrors/debian (and any other settings that apply to you. Then run "apt-move update".
The directory should now be suitable for use as an apt repository, either locally, via something like NFS, or used in an httpd configuration.
deb file:///srv/mirrors/debian/ unstable main
I also create subdirectories of /srv/mirrors/debian/ that contain files I might want during installation - such as gpg signing keys, additional downloads, and dumps from debconf, dpkg-query, deborphan etc.
"apt-move update && apt-get clean" should be run periodically, say once a week. When you're re-installing, or when the size of the repository is approaching the capacity of your CD or DVD you'll want to dump it out. (The following assumes that cdrecord is already configured with the apropriate defaults.)
echo "Debian backup (`date +%Y%m%d`)" > /srv/mirrors/debian/.disk/info mkisofs -hide-rr-moved -allow-leading-dots -r -f \ -V "`< /srv/mirrors/debian/.disk/info`" \ -x /srv/mirrors/debian/.apt-move \ /srv/mirrors/debian | cdrecord -v -
Label the disk as "Debian backup (20060216)" where the date corresponds to the current date. You might also want to run "apt-cdrom add" to add the CD as an apt source.
Comments on this Entry