|
|
|
| |
|
|
-- NeilBriscoe - 06 Mar 2009
Synopsis: General housekeeping tasks for your CensorNet server
There are certain tasks you can perform if you find your CensorNet server running low on disk space. It is also a good idea to perform housekeeping prior to upgrading or taking a backup.
Removing archivesFirst, whilst the CensorNet will automatically archive the live log after certain number of records, it never automatically removes the archives. These can build up and eventually the database may fill your disc space. You can easily clear these down using Reports->Manage Archives via the web control panel. The most recent archive is listed first, earlier ones underneath. They show the dates of the first and last record in each. Simply delete the archives you no longer need to run reports against.Vacuum the databaseSecondly, over time, you will have added and deleted records to your database. A record that has been deleted is actually only marked as deleted, for speed, it is not physically removed from the database. You can clean up your database by typing these commands at the command line (as root)su -c 'psql censornet' postgres vacuum full;This can take a while to run, so it is best to do it at the end of your working day. When it has completed type Ctrl-D to exit the postgres database prompt. How to clear the on-disk web cache (squid)Finally, if you should run out of disc space, one quick way to retrieve some is to clear the web cache. Run these commands :/etc/init.d/squid stop cd /var/spool rm -r squidThis can sometimes take a few moments. When the command prompt returns, type these commands : mkdir squid chown proxy.proxy squid cd squid /usr/sbin/squid -zThis last command can take a few moments to re-create the structure for the squid cache, then continue with:. cd .. chown -R proxy.proxy squidFinally, you can restart squid with : /etc/init.d/squid start |