X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=config%2Fdebian%2Fdinstall.functions;h=abece80332926af50cd3052c8286b35329f8a47e;hb=144898960af3c564c0a93203cafff457636d2163;hp=635d99c4bf6b21c1b30d3f7f04f90e4a0ea39869;hpb=cf8ebc90d6f676442029880c7302f06093a66654;p=dak.git diff --git a/config/debian/dinstall.functions b/config/debian/dinstall.functions index 635d99c4..abece803 100644 --- a/config/debian/dinstall.functions +++ b/config/debian/dinstall.functions @@ -59,25 +59,6 @@ function pgdump_post() { #ln -sf $base/backup/dumpall_$POSTDUMP currentall } -# Load the dak-dev projectb -function pgdakdev() { - # Make sure to unset any possible psql variables so we don't drop the wrong - # f****** database by accident - local PGDATABASE - unset PGDATABASE - local PGHOST - unset PGHOST - local PGPORT - unset PGPORT - local PGUSER - unset PGUSER - cd $base/backup - echo "drop database projectb" | psql -p 5434 template1 - #cat currentall | psql -p 5433 template1 - createdb -p 5434 -T template1 projectb - fgrep -v '\connect' current | psql -p 5434 projectb -} - # Updating various files function updates() { log "Updating Bugs docu, Mirror list and mailing-lists.txt" @@ -160,8 +141,6 @@ function filelist() { } function fingerprints() { - log "Not updating fingerprints - scripts needs checking" - log "Updating fingerprints" dak import-keyring -L /srv/keyring.debian.org/keyrings/debian-keyring.gpg @@ -209,8 +188,7 @@ function packages() { cd $configdir #apt-ftparchive generate apt.conf dak generate-packages-sources - #TEST: try experimental - dak contents -s experimental generate + dak contents generate } function pdiff() { @@ -441,7 +419,7 @@ function mirror() { echo "Running on host: $(hostname -f)" >> ${TRACEFILE} echo "Archive serial: ${SERIAL}" >> ${TRACEFILE} cd ${mirrordir} - rsync -aH --link-dest ${ftpdir} --delete --delete-after --ignore-errors ${ftpdir}/. . + rsync -aH --link-dest ${ftpdir} --delete --delete-after --delete-excluded --exclude Packages.*.new --exclude Sources.*.new --ignore-errors ${ftpdir}/. . } function expire() { @@ -522,17 +500,10 @@ function aptftpcleanup() { apt-ftparchive -q clean apt.conf } -function compress() { - log "Compress old psql backups" +function cleantransactions() { + log "Cleanup transaction ids older than 3 months" cd $base/backup/ - find -maxdepth 1 -mindepth 1 -type f -name 'dump_pre_*' -mtime +2 -print0 | xargs -0 --no-run-if-empty rm - - find -maxdepth 1 -mindepth 1 -type f -name 'dump_*' \! -name '*.bz2' \! -name '*.gz' \! -name '*.xz' -mmin +720 -print0 \ - | xargs --no-run-if-empty -0 -P4 -n16 xz -9v - - find -maxdepth 1 -mindepth 1 -type f -name "dumpall_*" \! -name '*.bz2' \! -name '*.gz' \! -name '*.xz' -mmin +720 \ - | xargs --no-run-if-empty -0 -P4 -n16 xz -9v - finddup -l -d $base/backup + find -maxdepth 1 -mindepth 1 -type f -name 'txid_*' -mtime +90 -print0 | xargs -0 --no-run-if-empty rm } function logstats() {