The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

snapback_loop -- loop waiting to call snapback2

SYNOPSIS

  snapback_loop [-c configfile] &

DESCRIPTION

This script just loops looking for a file in the communication directory, by default /tmp/backups. It then calls snapback2 with the specified configuration file name root based in /etc/snapback.

It exists to allow someone to start an ssh-agent, then walk away for unattended backup over a long period.

You would typically start the script with a few commands. For bash/ksh/sh:

        ## type ssh key passphrase when prompted
        ssh-agent > ~/.sshenv
        . ~/.sshenv
        ssh-add 
        snapback_loop >>/tmp/snapback_loop.log 2>&1 &

or tcsh/csh:

        ## type ssh key passphrase when prompted
        ssh-agent -c > ~/.sshenv
        source ~/.sshenv
        ssh-add 
        snapback_loop >>& /tmp/snapback_loop.log

The author has a machine dedicated to Snapback2, and this is in the rc.local so it starts on boot.

To initiate a backup, you just put entries in crontab like:

 18 * * * * touch /tmp/backups/snapback

The filename is the name of the snapback configuration file. The above would cause a call to:

            /usr/local/bin/snapback2 snapback

which is equivalent to

            /usr/local/bin/snapback2 -c /etc/snapback/snapback.conf

Errors in snapback are emailed to the AdminEmail address set in the snapback.conf configuration.

If the snapback configuration file is not specified with the -c command line option, the following files are checked for existence in order and the first one found is used:

        /etc/snapback2.conf
        /etc/snapback/snapback2.conf
        /etc/snapback.conf
        /etc/snapback/snapback.conf

If it is still not found, the defaults will be used.

OPTIONS

-c configfile

The complete path to the configuration file to use. If not specified, defaults to:

        /etc/snapback2.conf
        /etc/snapback/snapback2.conf
        /etc/snapback.conf
        /etc/snapback/snapback.conf
-d

Turns snapback2 debug on. Equivalent to setting "SnapbackOpts -d" in the configuration file. Will not override SnapbackOpts in the config, though.

AUTHOR

Mike Heins, <mikeh@perusion.com>.