Guruz Log [secgroup__at__guruz.hu]

Current path :: home

2011-02-25

-- Backing up FreeBSD using UFS2 snapshots with Bacula (tested on FreeBSD 8.1 with Bacula 5.0.3) --

This method uses "sysutils/freebsd-snapshot" package from ports.

Job resource:
Job {
  Name = "New-Root-Snapshot"
  JobDefs = "DefaultJob"
  FileSet = "Root Snapshot FileSet"
  Schedule = "WeeklyCycle"
  Client = New-fd
  Pool = FilePool
  Messages = Standard
  Priority = 8

  ClientRunBeforeJob = "sh -c 'gpart list >/root/gpart.list'"
  ClientRunBeforeJob = "sh -c 'fdisk -p >/root/fdisk.list'"
  ClientRunBeforeJob = "sh -c 'bsdlabel amrd0s1 >/root/bsdlabel.list'"

  ClientRunBeforeJob = "sh -c 'snapshot make /:bacula.0'"
  ClientRunBeforeJob = "sh -c 'snapshot mount /:bacula.0 /snapshot'"

  ClientRunAfterJob = "sh -c 'snapshot umount /snapshot'"
  ClientRunAfterJob = "sh -c 'snapshot make -g0 /:bacula.0'"
}
FileSet resource:
FileSet {
  Name = "Root Snapshot FileSet"
  Include {
   Options {
        Compression = GZIP6
        OneFS = yes
        signature = SHA1
        aclsupport = yes
        honor nodump flag = yes
        strippath = 1
    }
    File = /snapshot
  }

  Include {
     Options {
        wildfile = "*.bz2"
        wildfile = "*.gz"
        Exclude = yes
        Compression = GZIP6
        signature = SHA1
        aclsupport = yes
        strippath = 1
     }
     File = /snapshot/var/log
  }

#
# If you backup the root directory, the following two excluded
#   files can be useful
#
  Exclude {
    File = /snapshot/lost+found
    File = /snapshot/var/log
    File = /snapshot/var/db/bacula
    File = /snapshot/tmp
    File = /snapshot/var/tmp
    File = /snapshot/usr/tmp
    File = /snapshot/proc
    File = /snapshot/tmp
    File = /snapshot/dev
    File = /snapshot/.snap
    File = /snapshot/backup
    File = /snapshot/usr/ports
    File = /snapshot/usr/src
    File = /snapshot/usr/obj
    File = /snapshot/var/db/freebsd-update
    File = /snapshot/var/db/portsnap
  }
}

posted at: 11:08 | path: /freebsd/bacula | permalink to this entry


2011-01-19

-- OpenWRT - CJB dyndns updater --

Add the following section into "/etc/config/ddns" file:
config 'service' 'CJB'
        option 'check_interval' '10'
        option 'check_unit' 'minutes'
        option 'force_interval' '72'
        option 'force_unit' 'hours'
        option 'enabled' '1'
        option 'domain' 'www.$SITENAME.cjb.net'
        option 'username' '$USERNAME'
        option 'password' '$PASSWORD'
        option 'ip_source' 'network'
        option 'ip_network' 'wan'
        option 'update_url' 'http://www.cjb.net/cgi-bin/dynip.cgi?username=[USERNAME]&password=[PASSWORD]&ip=[IP]'

posted at: 14:12 | path: /linux/openwrt | permalink to this entry


2011-01-03

-- Bacula-fd - MacOSX Server - Launchd --

Custom ".plist" for LaunchDaemon on MacOSX Server, the bacula's builtin is uses "daemondo" (bacula is compiled from macports)

Download: org.macports.bacula-fd.plist and place it to "/System/Library/LaunchDaemons/" directory.

Start: launchctl load -w org.macports.bacula-fd.plist

posted at: 17:30 | path: /mac/bacula | permalink to this entry


2010-12-23

-- Dezo Site --

Dezső Boda's Site

posted at: 17:30 | path: | permalink to this entry


-- FreeBSD and SquirrelMail and gettext - safe_mode settings in Apache virtualhost --

The PHP INI settings in Apache virthost "php_admin_value safe_mode Off" works  
as expected, but not in PHP "(bool)" conversion:

"php_admin_value safe_mode Off" means TRUE  in "bool"
"php_admin_value safe_mode 0"   means FALSE in "bool"

FreeBSD needs to set up LANG environment to gettext working properly,
but if "php_admin_value safe_mode" set to "Off", SquirrelMail doesn't set LANG environment up.


The code sample from functions/i18n.php on line 426:

        if ( !((bool)ini_get('safe_mode')) &&
             getenv( 'LC_ALL' ) != $longlocale ) {
            putenv( "LC_ALL=$longlocale" );
            putenv( "LANG=$longlocale" );  
            putenv( "LANGUAGE=$longlocale" );
            putenv( "LC_NUMERIC=C" );
            if ($sm_notAlias=='tr_TR') putenv( "LC_CTYPE=C" );
        }
         
         
My config: FreeBSD_8.1,apache-2.2.17,php5-5.3.4,squirrelmail-1.4.21


Workaround: Set "php_admin_value safe_mode" to "0" instead of "Off" in Apache virtualhost config.


posted at: 18:04 | path: /freebsd/squirrelmail | permalink to this entry


2008-12-17

-- Forwarding HTTPS and iLOM screen: --

ssh remote_gateway_address -L 0.0.0.0:443:ILOM_ADDRESS:443 -L0.0.0.0:8890:ILOM_ADDRESS:8890
and
https://remote_gateway_address:443/

posted at: 10:42 | path: /sun | permalink to this entry


2008-11-12

-- SSH known hosts (~/.ssh/known_hosts) editor for MacOSX --

gcc -lssl -o ssh-kh ssh-kh.c

posted at: 16:58 | path: /mac | permalink to this entry


-- Redhat automatic install --

Boot CD or DVD and type at boot prompt:

linux ks=http://webserver/ks.cfg

posted at: 18:14 | path: /linux/redhat | permalink to this entry


powered by blosxom