Setup the mirror by following the steps described here Show archive.org snapshot .
If you want to enable OS upgrades using
do-release-upgrade make sure you include $release-proposed packages in the mirror script, e.g., precise-proposed. Additionally, you have to add
main/dist-upgrader-all to the $section in your script as
debmirror silently ignores some directories.
I attached our modified script to include current releases
Download the following two files into the root document directory of your local mirror:
wget http://changelogs.ubuntu.com/meta-release wget http://changelogs.ubuntu.com/meta-release-lts
Open both files, replace the hostname
archive.ubuntu.com with your local mirror.
On the client machine you want to do the release upgrade, modify
/etc/update-manager/meta-release such that
URI = http://$mirror/meta-release URI_LTS = http://$mirror/meta-release-lts
do-release-upgrade, it should now use your local mirror.