I will soon be in a place where internet bandwidth will be limited and I will have to upgrade about 5 workstations to the latest Ubuntu LTS. Back then in $previous_workplace, I set up debmirror back then and moved onto apt-mirror afterwards. I currently run Arch Linux on my home workstation and needed to replicate a mirror onto a harddrive. Turns out apt-mirror is actually available on the AUR repos, so just install this from there.
You will then need to set your repos in /etc/apt/mirror.list, here is mine:
set base_path /mnt/disk/apt deb-amd64 http://ie.archive.ubuntu.com/ubuntu precise main restricted universe multiverse deb-amd64 http://ie.archive.ubuntu.com/ubuntu precise-security main restricted universe multiverse deb-amd64 http://ie.archive.ubuntu.com/ubuntu precise-updates main restricted universe multiverse clean http://ie.archive.ubuntu.com/ubuntu
You can then create the directories on your new hard drive and launch the replication, like this:
mkdir -p /mnt/disk/apt/{skel,var,mirror} apt-mirror
All going well, it should start saying something along those lines:
[frlinux@darkangel ~]$ sudo apt-mirror Downloading 48 index files using 20 threads... Begin time: Sun Aug 12 18:45:16 2012 [20]... [19]... [18]... [17]... [16]... [15]... [14]... [13]... [12]... [11]... [10]... [9]... [8]... [7]... [6]... [5]... [4]... [3]... [2]... [1]... [0]... End time: Sun Aug 12 18:45:24 2012 Proceed indexes: [PPP] 49.9 GiB will be downloaded into archive. Downloading 41216 archive files using 20 threads... Begin time: Sun Aug 12 18:45:27 2012 [20]...