Discussion:
[Sks-devel] Cleanup SKS Logs
Moritz Wirth
2017-12-06 19:10:36 UTC
Permalink
Hello everybody,

keys.flanga.io started running out of space and I want to cleanup some
space. The database has been used for a year and is around 38 GB big now
- compared:  the db size on keys2.flanga.io is about 28 GB and 21 GB on
keys3.flanga.io

Can we delete the logfiles in the KDB/ directory (log.xxxxx) - are there
other ways to save some space?

Best regards,

Moritz
Kristian Fiskerstrand
2017-12-06 19:19:34 UTC
Permalink
Post by Moritz Wirth
Can we delete the logfiles in the KDB/ directory (log.xxxxx) - are there
other ways to save some space?
the sample DB_CONFIG includes
set_flags DB_LOG_AUTOREMOVE

that should solve this for you automatically. But you have some info on
manual procedure in UPGRADING file, specifically look for db5.3_archive
or similar for your distribution (there are some differences in naming
conventions etc for multiple versions)
--
----------------------------
Kristian Fiskerstrand
Blog: https://blog.sumptuouscapital.com
Twitter: @krifisk
----------------------------
Public OpenPGP keyblock at hkp://pool.sks-keyservers.net
fpr:94CB AFDD 3034 5109 5618 35AA 0B7F 8B60 E3ED FAE3
----------------------------
Ubi mel ibi apes
Where there's honey, there are bees
Timothy A. Holtzen
2017-12-06 22:22:08 UTC
Permalink
I follow the following procedure to reduce the size of the KDB directory.

1. Stop the sks-keyserver
2. cd into the /var/lib/sks/KDB directory
3. run the command “db_recover -ev”
4. run the command “db_checkpoint -1”
5. run the command “db_archive -dv” ←- This actually removed the old log
files
6. run the command “db_recover -ev”
7. Start the sks-keyserver

I believe you can run the same procedure substituting the PTree
directory and reduce the size there too.  However the PTree directory is
usually much smaller to begin with. The last time I did this the KDB
directory went from about 35G to about 18G.

Timothy A. Holtzen
Campus Network Administrator
Nebraska Wesleyan University
Public PGP key CFB4 3AE8 B726 DEBF 00D9 CCFC 426E 76AF DABC B3D7
Post by Moritz Wirth
Hello everybody,
keys.flanga.io started running out of space and I want to cleanup some
space. The database has been used for a year and is around 38 GB big now
- compared:  the db size on keys2.flanga.io is about 28 GB and 21 GB on
keys3.flanga.io
Can we delete the logfiles in the KDB/ directory (log.xxxxx) - are there
other ways to save some space?
Best regards,
Moritz
_______________________________________________
Sks-devel mailing list
https://lists.nongnu.org/mailman/listinfo/sks-devel
Alain Wolf
2017-12-06 23:54:53 UTC
Permalink
Post by Moritz Wirth
Can we delete the logfiles in the KDB/ directory (log.xxxxx) - are there
other ways to save some space?
In the Debian and Ubuntu packages for SKS there is a *sks.cron.daily*
script included which does some maintenance work in /var/spool/sks,
/var/lib/sks/DB and /var/lib/sks/PTree.

On my server ...
du -hs /var/lib/sks /var/spool/sks/
19G    /var/lib/sks
508K    /var/spool/sks/
--
# pgpkeys.urown.net 11370 # Alain Wolf <***@urown.net> 0x27A69FC9A1744242
Fabian A. Santiago
2017-12-08 16:22:30 UTC
Permalink
Post by Kristian Fiskerstrand
Post by Moritz Wirth
Can we delete the logfiles in the KDB/ directory (log.xxxxx) - are there
other ways to save some space?
the sample DB_CONFIG includes
set_flags DB_LOG_AUTOREMOVE
that should solve this for you automatically. But you have some info on
manual procedure in UPGRADING file, specifically look for db5.3_archive
or similar for your distribution (there are some differences in naming
conventions etc for multiple versions)
--
----------------------------
Kristian Fiskerstrand
Blog: https://blog.sumptuouscapital.com
----------------------------
Public OpenPGP keyblock at hkp://pool.sks-keyservers.net
fpr:94CB AFDD 3034 5109 5618 35AA 0B7F 8B60 E3ED FAE3
----------------------------
Ubi mel ibi apes
Where there's honey, there are bees
_______________________________________________
Sks-devel mailing list
https://lists.nongnu.org/mailman/listinfo/sks-devel
can you add DB_LOG_AUTOREMOVE to an existing setup without affecting anything adversely or having to do anything else other than a restart?

--

Thanks,

Fabian S.

OpenPGP: 3C3FA072ACCB7AC5DB0F723455502B0EEB9070FC
Moritz Wirth
2017-12-08 16:42:32 UTC
Permalink
Hi,

I simply created a DB_CONFIG file in the KDB/ folder and added
set_flags               DB_LOG_AUTOREMOVE to the file. After a restart
of the sks-db the database size was reduced to about 19GB - I did not
notice any problems with it.

Best regards,

Moritz
Post by Fabian A. Santiago
Post by Kristian Fiskerstrand
Post by Moritz Wirth
Can we delete the logfiles in the KDB/ directory (log.xxxxx) - are there
other ways to save some space?
the sample DB_CONFIG includes
set_flags DB_LOG_AUTOREMOVE
that should solve this for you automatically. But you have some info on
manual procedure in UPGRADING file, specifically look for db5.3_archive
or similar for your distribution (there are some differences in naming
conventions etc for multiple versions)
--
----------------------------
Kristian Fiskerstrand
Blog: https://blog.sumptuouscapital.com
----------------------------
Public OpenPGP keyblock at hkp://pool.sks-keyservers.net
fpr:94CB AFDD 3034 5109 5618 35AA 0B7F 8B60 E3ED FAE3
----------------------------
Ubi mel ibi apes
Where there's honey, there are bees
_______________________________________________
Sks-devel mailing list
https://lists.nongnu.org/mailman/listinfo/sks-devel
can you add DB_LOG_AUTOREMOVE to an existing setup without affecting anything adversely or having to do anything else other than a restart?
--
Thanks,
Fabian S.
OpenPGP: 3C3FA072ACCB7AC5DB0F723455502B0EEB9070FC
_______________________________________________
Sks-devel mailing list
https://lists.nongnu.org/mailman/listinfo/sks-devel
Fabian A. Santiago
2017-12-08 18:25:21 UTC
Permalink
Post by Moritz Wirth
Hi,
I simply created a DB_CONFIG file in the KDB/ folder and added
set_flags DB_LOG_AUTOREMOVE to the file. After a restart
of the sks-db the database size was reduced to about 19GB - I did not
notice any problems with it.
Best regards,
Moritz
Post by Moritz Wirth
Can we delete the logfiles in the KDB/ directory (log.xxxxx) - are there
other ways to save some space?
Post by Kristian Fiskerstrand
the sample DB_CONFIG includes
set_flags DB_LOG_AUTOREMOVE
that should solve this for you automatically. But you have some info on
manual procedure in UPGRADING file, specifically look for db5.3_archive
or similar for your distribution (there are some differences in naming
conventions etc for multiple versions)
--
----------------------------
Kristian Fiskerstrand
Blog: https://blog.sumptuouscapital.com
----------------------------
Public OpenPGP keyblock at hkp://pool.sks-keyservers.net
fpr:94CB AFDD 3034 5109 5618 35AA 0B7F 8B60 E3ED FAE3
----------------------------
Ubi mel ibi apes
Where there's honey, there are bees
_______________________________________________
Sks-devel mailing list
https://lists.nongnu.org/mailman/listinfo/sks-devel
can you add DB_LOG_AUTOREMOVE to an existing setup without affecting anything adversely or having
to do anything else other than a restart?
--
Thanks,
Fabian S.
OpenPGP: 3C3FA072ACCB7AC5DB0F723455502B0EEB9070FC
_______________________________________________
Sks-devel mailing list
https://lists.nongnu.org/mailman/listinfo/sks-devel
ok i tried that and same here, 19G. seems to have worked. thanks.

--

Thanks,

Fabian S.

OpenPGP: 3C3FA072ACCB7AC5DB0F723455502B0EEB9070FC
Kristian Fiskerstrand
2017-12-08 18:59:38 UTC
Permalink
Post by Fabian A. Santiago
can you add DB_LOG_AUTOREMOVE to an existing setup without affecting
anything adversely or having to do anything else other than a
restart?
As implied by the other posts, I can confirm that there is indeed no
issue to change for existing data stores. Some changes to config
requires recreating the BDB environment, which can be done using the
UPGRADING procedures, but you'd mostly need to do that if experiencing
issues / it not taking.
--
----------------------------
Kristian Fiskerstrand
Blog: https://blog.sumptuouscapital.com
Twitter: @krifisk
----------------------------
Public OpenPGP keyblock at hkp://pool.sks-keyservers.net
fpr:94CB AFDD 3034 5109 5618 35AA 0B7F 8B60 E3ED FAE3
----------------------------
Uxor formosa et vinum sunt dulcia venena
Beautiful women and wine are sweet venom
Loading...