[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: How to prevent automatic deletion of apt cache upon server reboot?



>> Especially in the test phase it would really help me if DebianEdu
>> wouldn?t
>> delete the cache anytime I restart the server.
>>
>> This causes so much delay since packages have to be downloaded again and
>> again. Sometimes, our internet connection is really bad.
>>
>> How can I prevent DebianEdu to do this?
>
> Hi folks,
>
> I did more research and I believe some of my statements are simply wrong.
> Sorry for this!
>
> It appears that cached files in /var/cache/apt/archives are not deleted
> upon restart of the server. In my case they were rather deleted by the
> script that I used to create a new chroot, which is 'debian-edu-ltsp
> --arch i386'.
>
> It also appears that the downloaded files do not show in
> /var/cache/apt/archives anymore but they are still available even after
> rebooting the server. This is kind of a mystery to me.
>
> I was assuming that if the files in the cache folder are gone, then the
> build process would need to download the files again. However, this is not
> happening. Has squid something to do with this?

I did more research and my guess appears to be right. Squid has cached the
files.

I installed the squid reporting module 'sarg' and it shows quite some
activity during the rebuilding time of chroot.

Here are my installation notes to get this working:

apt-get update
apt-get install sarg

nano /etc/sarg/sarg.conf
change output_dir to '/etc/debian-edu/www/squid-reports'
change date_format to 'e'

execute report with 'sarg ?x'

Check report with browser
https://www/squid-reports/

Kind regards,
Roman


Reply to: