|
From: <st...@us...> - 2007-01-12 11:45:51
|
Revision: 280
http://safekeep.svn.sourceforge.net/safekeep/?rev=280&view=rev
Author: stelian
Date: 2007-01-12 03:45:49 -0800 (Fri, 12 Jan 2007)
Log Message:
-----------
Add documentation and rework the sample configuration file.
Modified Paths:
--------------
safekeep/trunk/Makefile
safekeep/trunk/debian/control
safekeep/trunk/debian/rules
safekeep/trunk/safekeep
safekeep/trunk/safekeep.spec.in
safekeep/trunk/sample.cfg
Added Paths:
-----------
safekeep/trunk/doc/
safekeep/trunk/doc/Makefile
safekeep/trunk/doc/asciidoc.conf
safekeep/trunk/doc/callouts.xsl
safekeep/trunk/doc/safekeep.txt
Modified: safekeep/trunk/Makefile
===================================================================
--- safekeep/trunk/Makefile 2007-01-12 05:02:13 UTC (rev 279)
+++ safekeep/trunk/Makefile 2007-01-12 11:45:49 UTC (rev 280)
@@ -35,6 +35,7 @@
@echo "SVN Root = $(svnroot)"
build:
+ $(MAKE) -C doc build
release: check-info commit-release tag-release rpm-release
@@ -95,5 +96,6 @@
safekeep-test --remote
clean:
+ $(MAKE) -C doc clean
rm -rf `find -name "*.py[co]" -o -name "*~"```
rm -f $(name).spec debian/changelog
Modified: safekeep/trunk/debian/control
===================================================================
--- safekeep/trunk/debian/control 2007-01-12 05:02:13 UTC (rev 279)
+++ safekeep/trunk/debian/control 2007-01-12 11:45:49 UTC (rev 280)
@@ -2,7 +2,7 @@
Section: Applications/System
Priority: optional
Maintainer: Lattica, Inc.
-Build-Depends: debhelper (>= 4.0.0)
+Build-Depends: debhelper (>= 4.0.0), xmlto, asciidoc > 6.0.3
Standards-Version: 3.6.2
Package: safekeep
Modified: safekeep/trunk/debian/rules
===================================================================
--- safekeep/trunk/debian/rules 2007-01-12 05:02:13 UTC (rev 279)
+++ safekeep/trunk/debian/rules 2007-01-12 11:45:49 UTC (rev 280)
@@ -12,10 +12,13 @@
dh_clean -k
dh_installdirs
+ make build
+
mkdir -p $(CURDIR)/debian/safekeep/usr/bin
mkdir -p $(CURDIR)/debian/safekeep/etc/safekeep.d
install -m 755 safekeep $(CURDIR)/debian/safekeep/usr/bin
+ install -m 755 doc/safekeep.1 $(CURDIR)/debian/safekeep/usr/man/man1
binary-indep: install
dh_testdir
Added: safekeep/trunk/doc/Makefile
===================================================================
--- safekeep/trunk/doc/Makefile (rev 0)
+++ safekeep/trunk/doc/Makefile 2007-01-12 11:45:49 UTC (rev 280)
@@ -0,0 +1,25 @@
+MAN_TXT := $(wildcard *.txt)
+DOC_HTML := $(patsubst %.txt,%.html,$(MAN_TXT))
+DOC_MAN := $(patsubst %.txt,%.1,$(MAN_TXT))
+
+all: html man
+
+build: all
+
+html: $(DOC_HTML)
+
+man: $(DOC_MAN)
+
+clean:
+ rm -f *.xml *.html *.1
+
+$(DOC_HTML) $(DOC_MAN): asciidoc.conf
+
+%.html: %.txt
+ asciidoc -b xhtml11 -d manpage -f asciidoc.conf $<
+
+%.1: %.xml
+ xmlto -m callouts.xsl man $<
+
+%.xml: %.txt
+ asciidoc -b docbook -d manpage -f asciidoc.conf $<
Added: safekeep/trunk/doc/asciidoc.conf
===================================================================
--- safekeep/trunk/doc/asciidoc.conf (rev 0)
+++ safekeep/trunk/doc/asciidoc.conf 2007-01-12 11:45:49 UTC (rev 280)
@@ -0,0 +1,5 @@
+[attributes]
+caret=^
+startsb=[
+endsb=]
+tilde=~
Added: safekeep/trunk/doc/callouts.xsl
===================================================================
--- safekeep/trunk/doc/callouts.xsl (rev 0)
+++ safekeep/trunk/doc/callouts.xsl 2007-01-12 11:45:49 UTC (rev 280)
@@ -0,0 +1,30 @@
+<!-- callout.xsl: converts asciidoc callouts to man page format -->
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+<xsl:template match="co">
+ <xsl:value-of select="concat('\fB(',substring-after(@id,'-'),')\fR')"/>
+</xsl:template>
+<xsl:template match="calloutlist">
+ <xsl:text>.sp </xsl:text>
+ <xsl:apply-templates/>
+ <xsl:text> </xsl:text>
+</xsl:template>
+<xsl:template match="callout">
+ <xsl:value-of select="concat('\fB',substring-after(@arearefs,'-'),'. \fR')"/>
+ <xsl:apply-templates/>
+ <xsl:text>.br </xsl:text>
+</xsl:template>
+
+<!-- sorry, this is not about callouts, but attempts to work around
+ spurious .sp at the tail of the line docbook stylesheets seem to add -->
+<xsl:template match="simpara">
+ <xsl:variable name="content">
+ <xsl:apply-templates/>
+ </xsl:variable>
+ <xsl:value-of select="normalize-space($content)"/>
+ <xsl:if test="not(ancestor::authorblurb) and
+ not(ancestor::personblurb)">
+ <xsl:text> </xsl:text>
+ </xsl:if>
+</xsl:template>
+
+</xsl:stylesheet>
Added: safekeep/trunk/doc/safekeep.txt
===================================================================
--- safekeep/trunk/doc/safekeep.txt (rev 0)
+++ safekeep/trunk/doc/safekeep.txt 2007-01-12 11:45:49 UTC (rev 280)
@@ -0,0 +1,171 @@
+safekeep(1)
+==========
+
+NAME
+----
+safekeep - Client/server backup script
+
+SYNOPSIS
+--------
+'safekeep' [-s] [-q] [-v] [-C file] [-e <email>] [-m <smtp>]
+
+'safekeep' -c
+
+'safekeep' -k [-q] [-v] [--status|--print|--deploy] <clientid>*
+
+'safekeep' -h | -V
+
+DESCRIPTION
+-----------
+SafeKeep is a client/server backup script which enhances the
+power of rdiff-backup with simple configuration and use.
+
+SafeKeep can work in server mode, client mode or SSH key management mode.
+
+In server mode, SafeKeep parses a set of configurations files which
+defines a set of backup clients. For each backup client, SafeKeep
+connects to the client host over SSH (using a public key authentification
+system previously set up using `safekeep -k --deploy`), and launches
+`safekeep --client` onto the client host. The client does the real backup
+and sends the data over SSH to the SafeKeep server which stores it in
+the specified location.
+
+In client mode, SafeKeep does a few setup steps, depending on the
+client configuration (database dump, LVM device snapshot), then backups
+the client data using `rdiff-backup`, and then cleanups the state
+(removes the database dumps, deactivates the LVM snapshots)
+
+Note that the client mode of SafeKeep should never be invoked manually,
+this mode is meant to be used only by the server mode of SafeKeep.
+
+The SSH key management mode is a helper mode for deploying or verifying
+the setup of the SSH authentification keys.
+
+Each mode accepts a few options as described below.
+
+OPTIONS
+-------
+-s, --server::
+ Selects the server mode (default)
+
+-c, --client::
+ Selects the client mode. This should never be invoked manually, the
+ clients are started automatically by the server on the client machines
+ using SSH.
+
+-k, --keys::
+ Selects the SSH key management mode
+
+-h, --help::
+ Selects the help mode, in which safekeep prints out the
+ online help and exits.
+
+-V, --version::
+ Selects the version mode, in which safekeep prints out the
+ version number and exits.
+
+-q, --quiet::
+ Decreases the verbosity level. Can be specified more than
+ once.
+
+-v, --verbose::
+ Increases the verbosity level. Can be specified more than
+ once.
+
+-C, --cfg=FILE|DIR::
+ Specifies the configuration file location.
+ This can be a single file (for a single client configuration)
+ or a directory containing several configuration files (one per
+ backup client)
+
+-e, --email=EMAIL::
+ In addition to writing the session logs
+ on the standard output, this parameter let the user specify
+ the mail address where the logs are to be send. Can be specified
+ more than once to send reports to multiple addresses.
+
+-m, --smtp=SMTP::
+ Specifies the SMTP server used for sending
+ mails when `-e` is used. Defaults to `localhost`.
+
+--status::
+ (key mode only) Display the key status for the clients.
+
+--print::
+ (key mode only) Display the authorization keys for the clients.
+
+--deploy::
+ (key mode only) Deploy the authorization keys on the clients.
+
+Configuration file
+------------------
+
+Each backup client is described by a configuration file in XML format of the
+following form:
+
+------------------------------------------------------------------------
+<!-- the client backup id -->
+<backup id="my.host.com primary backup">
+
+ <!-- the client backup host, the user under which the servers will connect,
+ the SSH keys used for launching "safekeep -c" and "rdiff-backup" -->
+ <host
+ name="localhost" user="guest"
+ key-ctrl="/home/dimi/.ssh/backup_id_dsa"
+ key-data="/home/dimi/.ssh/backup2_id_dsa"
+ />
+
+ <!-- location where the backuped data will be stored on the server
+ and for how long (s=sec, m=min, h=hours, D=days, W=weeks, M=months, or Y=years) -->
+ <repo
+ path="./tmp"
+ retention="10D"
+ />
+
+ <!-- settings for database dump and for volume snapshot -->
+ <setup>
+
+ <!-- database type ("postgres" or "mysql"), user with backup rights,
+ location of the dump file on the client host, and flag to remove
+ or not the dump file after the backup is done -->
+ <dump
+ type="postgres"
+ db="dbname"
+ user="foobar"
+ file="/var/backup/dumps/mydata"
+ cleanup="true"
+ />
+
+ <!-- what volume is to be snapshoted (device location) and the size
+ of the snapshot (unallocated space must exist in the volume group) -->
+ <snapshot
+ device="/path/to/volume"
+ size="500M"
+ />
+
+ </setup>
+
+ <!-- data to be backuped -->
+ <data>
+ <!-- each type of tag can be present more than one time -->
+ <!-- if a database dump was created, it must be added in this section -->
+ <include path="/home"/>
+ <exclude path="/home/guest"/>
+
+ <include glob="**/important/"/>
+ <exclude glob="/home/*/tmp"/>
+
+ <include regexp=".*\.ogg"/>
+ <exclude regexp=".*\.mp3"/>
+ </data>
+</backup>
+------------------------------------------------------------------------
+
+See Also
+--------
+rdiff-backup(1)
+
+Author
+------
+Written by Dimi Paun <di...@la...> and Stelian Pop <st...@la...>.
+
Modified: safekeep/trunk/safekeep
===================================================================
--- safekeep/trunk/safekeep 2007-01-12 05:02:13 UTC (rev 279)
+++ safekeep/trunk/safekeep 2007-01-12 11:45:49 UTC (rev 280)
@@ -721,7 +721,6 @@
print '-C, --cfg=FILE|DIR use the given configuration file/directory'
print '-e, --email=EMAIL send results by email (can appear multiple times)'
print '-m, --smtp=SMTP SMTP server to use when sending mails (default: built-in SMTP)'
- print '--clientid=ID manage the keys of client identified by ID (keys mode only)'
print '--status display the key status for the clients (keys mode only, default)'
print '--print display the authorization keys (keys mode only)'
print '--deploy deploy the authorization keys (keys mode only)'
Modified: safekeep/trunk/safekeep.spec.in
===================================================================
--- safekeep/trunk/safekeep.spec.in 2007-01-12 05:02:13 UTC (rev 279)
+++ safekeep/trunk/safekeep.spec.in 2007-01-12 11:45:49 UTC (rev 280)
@@ -16,6 +16,7 @@
BuildArch: noarch
+BuildRequires: xmlto, asciidoc > 6.0.3
Requires: rdiff-backup
Provides: safekeep
@@ -27,9 +28,11 @@
%setup -q
%build
+make build
%install
install -m 755 safekeep "%{buildroot}%{_bindir}"
+install -m 755 doc/safekeep.1 "%{buildroot}%{_mandir}/man1/"
%clean
rm -rf "%{buildroot}"
@@ -37,6 +40,7 @@
%files
%defattr(-,root,root,-)
%{_bindir}/safekeep
+%{_mandir}/man1/safekeep.1*
%doc AUTHORS COPYING LICENSE README safekeep-test sample.cfg
%changelog
Modified: safekeep/trunk/sample.cfg
===================================================================
--- safekeep/trunk/sample.cfg 2007-01-12 05:02:13 UTC (rev 279)
+++ safekeep/trunk/sample.cfg 2007-01-12 11:45:49 UTC (rev 280)
@@ -1,32 +1,48 @@
+<!-- the client backup id -->
<backup id="my.host.com primary backup">
- <!-- the host from which the backup data will be copied, user under which "rdiff-backup --server" will run -->
- <host name="localhost" user="guest"
- <!-- key for SafeKeep -->
- key-ctrl="/home/dimi/.ssh/backup_id_dsa"
- <!-- key for rdiff-backup -->
- key-data="/home/dimi/.ssh/backup2_id_dsa" />
- <!-- where the backuped data will be stored and how long-->
- <!-- s=sec, m=min, h=hours, D=days, W=weeks, M=months, or Y=years,
- <repo path="./tmp" retention="10D" />
+
+ <!-- the client backup host, the user under which the servers will connect,
+ the SSH keys used for launching "safekeep -c" and "rdiff-backup" -->
+ <host
+ name="localhost" user="guest"
+ key-ctrl="/home/dimi/.ssh/backup_id_dsa"
+ key-data="/home/dimi/.ssh/backup2_id_dsa"
+ />
+
+ <!-- location where the backuped data will be stored on the server
+ and for how long (s=sec, m=min, h=hours, D=days, W=weeks, M=months, or Y=years) -->
+ <repo
+ path="./tmp"
+ retention="10D"
+ />
+
<!-- settings for database dump and for volume snapshot -->
<setup>
- <!-- type can be "postgres" or "mysql" -->
- <dump type="postgres"
- <!-- database name -->
- db="dbname"
- <!-- database user with backup rights -->
- user="foobar"
- <!-- location of the dump file on the original server -->
- file="/var/backup/dumps/mydata"
- <!-- cleanup flag -->
- cleanup="true" />
- <!-- what volume is to be snapshoted (device location) -->
- <!-- special care should be taken when size is decided. Unallocated space must exist on the physical drive -->
- <snapshot device="/path/to/volume" size="500M"/>
+
+ <!-- database type ("postgres" or "mysql"), user with backup rights,
+ location of the dump file on the client host, and flag to remove
+ or not the dump file after the backup is done -->
+ <dump
+ type="postgres"
+ db="dbname"
+ user="foobar"
+ file="/var/backup/dumps/mydata"
+ cleanup="true"
+ />
+
+ <!-- what volume is to be snapshoted (device location) and the size
+ of the snapshot (unallocated space must exist in the volume group) -->
+ <snapshot
+ device="/path/to/volume"
+ size="500M"
+ />
+
</setup>
+
+ <!-- data to be backuped -->
<data>
- <!-- each type of tag can be present more than one time -->
- <!-- if a database dump was created, it must be added in this section -->
+ <!-- each type of tag can be present more than one time -->
+ <!-- if a database dump was created, it must be added in this section -->
<include path="/home"/>
<exclude path="/home/guest"/>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|