Merge "reprepro: add note on removing components"

This commit is contained in:
Zuul 2021-10-29 23:41:08 +00:00 committed by Gerrit Code Review
commit 66571449a3
1 changed files with 30 additions and 0 deletions

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
============================