Re: [squid-users] how to reduce space

From: Henrik Nordström <henrik_at_henriknordstrom.net>
Date: Mon, 15 Mar 2010 10:00:18 +0100

mån 2010-03-15 klockan 06:53 +0000 skrev Malik Madni:

> most of the disk is used by the below directory.
> 4.7G /usr/local/squid/var/cache

What is your cache_dir configuration?

> is it safe to remove this directory??if yes then how??

Yes.

1. Stop Squid.

2. Remove cache by running

        rm -rf /usr/local/squid/var/cache/*

3. Rebuild the cache by running

        squid -z

4. Start Squid again.

Alternatively with much shorter downtime:

1. Stop Squid

2. Move the old cache out of the way by running

        cd /usr/local/squid/var/cache"
        mkdir junk
        mv ?? swap.* junk
        
3. Rebuild the cache by running

        squid -z

4. Start Squid again.

5. Remove the old cache contents by running

        rm -rf junk

Regards
Henrik
Received on Mon Mar 15 2010 - 09:00:21 MDT

This archive was generated by hypermail 2.2.0 : Mon Mar 15 2010 - 12:00:04 MDT