reprepro: add note on removing components

Change-Id: Ia50861042bb159a9e351321b2503f193eca4e576
This commit is contained in:
Ian Wienand 2021-10-29 10:46:59 +11:00
parent c7398abb4c
commit 26d955f344

View File

@ -90,6 +90,36 @@ Repository syncs are driven from ``cron`` on the
``/usr/local/bin/reprepro-mirror-update`` script. Repositories will
update, remove old references and perform the ``vos release``.
Removing components
===================
As we drop support for various releases we may wish to remove them
from the mirror. Firstly you should commit a change removing the
distribution from the configuration files. It is then a one-time
manual process to remove the actual files on disk, which should be
done with the update lock held.
It is best to run this in a root screen session. This will look
like::
# find the appropriate lock; config and volume;
# easy way is to look at the cron job arguments
$ flock -n /var/run/reprepro/<distro>.lock bash
$ K5START="k5start -t -f /etc/reprepro.keytab service/reprepro -- "
$ REPREPRO="${K5START} reprepro --confdir /etc/reprepro/<distro>"
# Clean up package indexes. This takes a few minutes
$ ${REPREPRO} --delete clearvanished
# We have keepunreferenced, because we take a two-step approach
# of dumping the unreferenced files in one run, then deleting them in
# the next, to ensure any tests in progress can access the old files.
# In this removal situation, we should clear out the files now
# This can take a while depending on the size of what is removed
$ ${REPREPRO} --nokeepunreferencedfiles deleteunreferenced
# The ssh wrapper is the easiest way to release the volume
$ source /usr/share/mirror-update/functions.sh
$ vos_release <mirror.volume>
$ exit
Advanced Recovery Techniques
============================