Linux Training

Linux training for private, public & voluntary sector.

0800 024 8425

City LinUX sample scripts - ftchbkup

NAME

ftchbkup - fetches backups from remote host to a local repository.

SYNOPSIS

ftchbkup [ -c <config> ] [ -d ] [ -l ][ -v ] < hostname >

AVAILABILITY

ftchbkup is a Bourne shell script which should work equally well on all versions of UNIX, Linux and Mac OS X.

DESCRIPTION

ftchbkup uses the configuration file ( /usr/local/etc/ftchbkup.cf by default) to determine the location and age of the backup files to fetched from the remote host and the path to the local repository. The archives are fetched using lftp .

In order to save disk space in the local repository, archives older than the maximum age set in configuration file are deleted once the the latest files have been successfully downloaded.

OPTIONS

-c    <config_file> Use the named configuration file in preference to the default /usr/local/etc/ftchbkup.cf .

-d    Start in debug mode. The script will run in a shell with the -x    option set.

-l    Log each backup field retrieved from the target host using the syslog facility.

-v    Set verbose mode. Ordinarily ftchbkup operates silently unless problems are detected. In verbose mode ftchbkup reports on each significant action.

EXAMPLES

ftchbkup -v caswallon-gw

Using the hostname " caswallon-gw " as the lookup key, ftchbkup will extract the details of the backup files to be fetched from the default configuration file /usr/local/etc/ftchbkup.cf , and fetch them from the remote server to the local repository.

BUGS

The script is quite crude having been developed to fetch archives from client servers hosted by 1and1. The use of the configuration file does however make it reasonably generic. File permissions are critical and sudo will be used within the script to execute the find command. With judicious use of the debug and verbose modes, permission and configuration problems should be relatively easy to resolve.

FILES

ftchbkup.cf.

SEE ALSO

clean.

AUTHOR

Clifford W Fulford, City Linux. Contact fulford@fulford.net or +44 (0)709 229 5385.


The layout and associated style sheets for this page are taken from the World Wide Web Consortium and used here under the W3C software licence.