[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Sks-devel] db logfile question
From: |
Mire, John |
Subject: |
Re: [Sks-devel] db logfile question |
Date: |
Sun, 14 Feb 2016 01:11:10 +0000 |
On Feb 12, 2016, at 4:09 PM, Jeffrey Johnson <address@hidden> wrote:
>On Feb 12, 2016, at 5:02 PM, Mire, John <address@hidden> wrote:
>
>-----BEGIN PGP SIGNED MESSAGE-----
>Hash: SHA256
>
>Greetings!
>
>After completing a successful keydump, is there a sks flag or -option to
>truncate the db logfiles (log.00000NNNN) older than the keydump? 791 logfiles
>are >starting to bloat the DB directory.
>
>Run db_archive -d.
>
>Here is the sequence (I call it fixit.sh) to clean up (and repair) sks
>databases.
>
>Edit to taste.
>
>hah
>
>73 de Jeff
>
>============================================== fixit.sh
>#!/bin/sh
>
>top="`pwd`"
>
>cd /srv/sks
>
>echo "KDB --"
>cd KDB
>sudo db61_recover -ev
>sudo db61_checkpoint -1
>sudo db61_archive -dv
>sudo db61_recover -ev
>cd ..
>
>echo "PTree --"
>cd PTree
>sudo db61_recover -ev
>sudo db61_checkpoint -1
>sudo db61_archive -dv
>sudo db61_recover -ev
>cd ..
>
>chown -R sks:sks .
>
>cd "$top"
Thanks, it worked like a charm. Since I run debian and freebsd sks servers, I
changed the script to suit my platform.
/john
#!/bin/sh
#
# /var/lib/sks/bin/fixit.sh
#
BASEDIR="/var/lib/sks"
DBVER=db6.0
SKSUSER=debian-sks
top="`pwd`"
cd $BASEDIR
echo "DB --"
cd DB
${DBVER}_recover -ev
${DBVER}_checkpoint -1
${DBVER}_archive -dv
${DBVER}_recover -ev
cd ..
echo "PTree --"
cd PTree
${DBVER}_recover -ev
${DBVER}_checkpoint -1
${DBVER}_archive -dv
${DBVER}_recover -ev
cd ..
chown -R $SKSUSER:$SKSUSER .
cd "$top"
##EOF