$Id: README,v 1.9 2006/07/23 15:21:50 andreas Exp $

Hostbup.py.

Random docs for the rdiff-backup base multi-client, multi-server incremental
backup system

NB: these need to be made into proper man pages one day.

Installation.

Notes:
- you need python version 2.2 or higher, with threading support on the backup
server. For NetBSD this means version 1.6ZH or higher with the python22-pth or 
python23-pth package. Make sure that the symlink for /usr/pkg/bin/python 
points to /usr/pkg/bin/python2p2 (or ..2p3). Alternatively, create a shell
wrapper with the line '/usr/pkg/bin/python2p2 /usr/local/bin/hostbup.py $@'.

- rdiff-backup should be version 0.12.6 or higher

For now, just copy hostbup.py to /usr/local/bin (or wherever you want), create
a config file in /etc. 

Running 'hostbup.py genconf machinemame' will produce the client configuration 
section for that host (and check proper access to the machine at the same time)
Cut and past the std output into your configuration file.

Running 'hostbup.py testaccess' will make sure all clients are reachable. It
also shows the version of rdiff-backup for each client.

Running 'hostbup.py testmail' will make sure that email notification to the
configured mailto account are working.

You then can run 'hostbup.py backup' to backup all file system, from all 
clients, 'hostbup.py backup <client>' to backup all file system form <client> 
only, or hostbup.py backup <client> <fs>' tu just backup one file system from
<client>.

hostbup.py

usage: hostbup [-ndv] [-c configfile] [-l logfile] cmd [options]
        -c configfile   default: /etc/hostbup.conf
        -l logfile              default: /var/log/hostbup.log
        -n don't run, just print commands
        -d debug
        -v verbose      - make rdiff-backup more verbose
        backup [client [fs]]  - run backup for all clients, or just 'client' and 'fs'
        genconf client [rsh]  - contact client and generate a config entry
        dumpconf            - parse and dump current config file
        testaccess          - test access to each client
        testmail            - test mail message to admin

The hostup.conf file. 

Syntax borrowed from bind version 8, for now see the sample file for 
details.

The configuration files has 3 sections, general, server and host:

General section 
	server <name>	default backup server for hosts, if not set, the first
				server in the server section will be the default server
	directory <name>  default backup server directory for hosts, if not set, 
				 the first server's first directory will be the default 
				 backup directory

	exclude { <dir> <dir> } directories to always exclude from backup on every 
				host, typically /tmp /kern /proc

	keep <time>	how long to keep backup incrementals (not implemented yet)

	options <string>	other options to pass to rdiff-backup

	rdiffbin <pathtordiff>	which rdiff-backup to execute

	mailto "user@domain"	where to send run output
	mailfrom "user@domain"	where mail comes from
	smtpserver "hostname"	where to send mail, default localhost
				when set to "viamail" /usr/sbin/sendmail -t is used
	logname "/path/to/logfile"	where to log output, default "/var/log/hostbup.log
	


Server section
	queues <int>		how many run queues to maintain
	directory <path>	root of the rdiff-backup tree
	rdiffbin<path>		path to executable on this server
	access rsh|ssh		default way for server to connect to clients


Client section
	os "osname"			Operating system the client runs, ie. "netbsd", "macos"
	version "x.y"		Version of the OS
	kerberos yes|no		is kerberos supported (not currently used)
	wakeup yes|no		send a wakeup request to this client 
								(needs /usr/pkg/bin/wol)	
	access rsh|ssh		how to connect to this client
	exclude pathlist	paths to  exclude from backup
	backupto "server"	which server to backup to, default is the first one in
						the server list
	keep timespec		how long to keep incrementals (not yet implemented)
	rdiffbin <path>		path to executable on this server
	fs fsspec			file system

Fs section (inside client)
	backup yes/no		enable backup of this fs, default yes
	keep timespec		how long to keep incrementals (not yet implemented)
	backupto "server"	which server to backup to, default is the one named
					in the client section or the first one in the server list
	exclude pathlist	paths to  exclude from backup

