Squid + squidguard + backup



  • Hey there,

    I'm trying to implement a backup for squid+squidguard settings (blacklists, rules, .., the whole schabang) using the Backup package. Backup successfully backups and restores all the given files, so there is no problem there (checked it a few times, works normally). But when Backup puts the files back to their corresponding paths, squid-squidguard won't switch to the new settings; furthermore, the new configs won't reflect in the web interface. I have two questions regarding this issue:

    1. What files should I tell the Backup package to backup/restore? Here is my list (which doesn't work):
    /usr/local/etc/squidGuard/squidguard_conf.xml
    /usr/local/pkg/squid.xml
    /usr/local/pkg/squid_auth.xml
    /usr/local/pkg/squid_cache.xml
    /usr/local/pkg/squidguard.xml
    /usr/local/pkg/squidguard_acl.xml
    /usr/local/pkg/squidguard_default.xml
    /usr/local/pkg/squidguard_dest.xml
    /usr/local/pkg/squidguard_log.xml
    /usr/local/pkg/squidguard_rewr.xml
    /usr/local/pkg/squidguard_time.xml
    /usr/local/pkg/squid_nac.xml
    /usr/local/pkg/squid_ng.xml
    /usr/local/pkg/squid_traffic.xml
    /usr/local/pkg/squid_upstream.xml
    /usr/local/pkg/squid_users.xml
    /usr/local/etc/squidGuard/squidGuard.conf
    /usr/local/etc/squid/squidGuard.conf
    /usr/local/etc/squid/squid.conf

    2. After the restore operation, the Backup package writes the files to their corresponding paths, but I don't know what PHP functions to call from the squid+squidguard packages and with what variables, and I couldn't figure out yet. These are the functions I could find, but I am not sure about the variables used by the functions etc.:

    Group 1:
    squidguard_resync() and squidguard_resync_acl() in /usr/local/pkg/squidguard.inc
    squid_resync() in /usr/local/pkg/squid.inc

    Group 2:
    sg_reconfigure() in /usr/local/pkg/squidguard.inc

    As far as I could understand group 1 converts .conf files into .xml files and group 2 does the opposite.

    Long story short, what functions in what files should I call after the restore operation of the Backup package so that squid+squidguard and the web interface applies the new configurations right away?

    Thanks in advance,
    Necmettin


Log in to reply