[squid-users] Backing up squid cache and restoring it

Eliezer Croitoru eliezer at ngtech.co.il
Sun Jan 20 22:04:40 UTC 2019


Just to make sure:
This swap.state behavior is only for UFS/AUFS cache_dir or also to rock?

Thanks,
Eliezer

----
Eliezer Croitoru
Linux System Administrator
Mobile: +972-5-28704261
Email: eliezer at ngtech.co.il



-----Original Message-----
From: squid-users [mailto:squid-users-bounces at lists.squid-cache.org] On Behalf Of Alex Rousskov
Sent: Thursday, January 17, 2019 19:23
To: squid-users at lists.squid-cache.org
Subject: Re: [squid-users] Backing up squid cache and restoring it

On 1/17/19 6:47 AM, Arne-Tobias Rak wrote:

> my goal is to restore a previous cache state in squid 3.x running on
> Ubuntu 16.04.
> 
> So far I have tried to create a copy of the /var/spool/squid and
> /var/log/squid folders.
> When restoring the cache, I first shutdown squid using
> /sudo squid -k shutdown//
> //sudo service squid stop -k
> /and then restore the previously copied folder contents. I then start
> squid again using
> /sudo service squid start./

> Unfortunately, this does not restore the previous cache contents, as the
> spool/squid/swap.state file is modified during squid startup.

Modification of swap.state upon startup is not incompatible with cache
contents preservation.

In a clean shutdown context, the swap.state* files are essentially an
optimization. You may preserve/restore them if you want to speed up
building of the restored cache index OR you can delete them (and Squid
will slowly build a new cache index from scratch). Just do not leave the
newer swap.state* files when trying to restore the old cache.

If you preserve/restore the old swap.state* files, you may need to
preserve their timestamps as well.


If you need further help, please share cache.log entries related to
cache_dir loading and indicate why you think the old cache contents is
not preserved. Sharing your cache_dir configuration may also help.


Cheers,

Alex.
_______________________________________________
squid-users mailing list
squid-users at lists.squid-cache.org
http://lists.squid-cache.org/listinfo/squid-users



More information about the squid-users mailing list