Log In | Users | Register
Welcome to Foswiki... Users, Groups
Go
Edit | Attach | New | Raw | Delete | History | Print | Tools
-- 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 archives

First, 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 database

Secondly, 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 squid

This 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 -z

This last command can take a few moments to re-create the structure for the squid cache, then continue with:.

cd ..

chown -R proxy.proxy squid

Finally, you can restart squid with :

/etc/init.d/squid start


Copyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Foswiki? Send feedback
Syndicate this site RSSATOM