From: Tech www <techwww_at_yahoo.com.cn>
> I may suggest a fast way, given your cache_dir is /data/cache, and squid is
> running with nobody, then do:
>
> stop squid;
> mv /data/cache /data/cache0;
> chown -R nobody:nobody /data/cache;
> squid -z;
> start squid;
> rm -rf /data/cache0 &;
I think a mkdir is missing...
I wonder if, to minimize the downtime, the following would work:
mkdir /data/cache.new
chown nobody:nobody /data/cache.new
squid -z -f /etc/squid_conf_with_datadir_is_cache.new.conf
stop squid
mv /data/cache /data/cache.old
mv /data/cache.new /data/cache
start squid
rm -rf /data/cache.old
Could you even keep cache.new and just copy it as cache each time, so no need to squid -z each time...?
stop squid
mv /data/cache /data/cache.old
cp -a /data/cache.new /data/cache
start squid
rm -rf /data/cache.old
JD
Received on Wed Apr 01 2009 - 13:37:05 MDT
This archive was generated by hypermail 2.2.0 : Wed Apr 01 2009 - 12:00:02 MDT