You can subscribe to this list here.
| 2007 |
Jan
(76) |
Feb
(76) |
Mar
(54) |
Apr
(14) |
May
(23) |
Jun
(21) |
Jul
|
Aug
|
Sep
(9) |
Oct
(14) |
Nov
(12) |
Dec
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2008 |
Jan
|
Feb
(18) |
Mar
(3) |
Apr
|
May
|
Jun
(2) |
Jul
(3) |
Aug
|
Sep
|
Oct
(17) |
Nov
(13) |
Dec
|
| 2009 |
Jan
(1) |
Feb
(1) |
Mar
(15) |
Apr
(2) |
May
(18) |
Jun
(1) |
Jul
|
Aug
(2) |
Sep
|
Oct
|
Nov
|
Dec
|
| 2010 |
Jan
(1) |
Feb
(5) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(61) |
Dec
|
| 2011 |
Jan
|
Feb
|
Mar
(18) |
Apr
|
May
|
Jun
(5) |
Jul
|
Aug
(1) |
Sep
(2) |
Oct
(4) |
Nov
(10) |
Dec
(9) |
| 2012 |
Jan
(10) |
Feb
(23) |
Mar
|
Apr
(5) |
May
(2) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
(4) |
| 2013 |
Jan
(17) |
Feb
(1) |
Mar
|
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: <st...@us...> - 2007-01-28 23:34:53
|
Revision: 323
http://safekeep.svn.sourceforge.net/safekeep/?rev=323&view=rev
Author: stelian
Date: 2007-01-28 15:34:41 -0800 (Sun, 28 Jan 2007)
Log Message:
-----------
Let the user know we're excluding some files because of wrong suffix.
Modified Paths:
--------------
safekeep/trunk/safekeep
Modified: safekeep/trunk/safekeep
===================================================================
--- safekeep/trunk/safekeep 2007-01-28 23:23:45 UTC (rev 322)
+++ safekeep/trunk/safekeep 2007-01-28 23:34:41 UTC (rev 323)
@@ -236,6 +236,7 @@
if os.path.isdir(cfg):
for ent in os.listdir(cfg):
if not ent.endswith(config_ext):
+ print >> sys.stderr, 'Ignoring file %s not ending in %s' % (os.path.join(cfg, ent), config_ext)
continue
filepath = os.path.join(cfg, ent)
if not os.path.isfile(filepath):
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <st...@us...> - 2007-01-28 23:23:47
|
Revision: 322
http://safekeep.svn.sourceforge.net/safekeep/?rev=322&view=rev
Author: stelian
Date: 2007-01-28 15:23:45 -0800 (Sun, 28 Jan 2007)
Log Message:
-----------
List the options in the same order as the modes.
Modified Paths:
--------------
safekeep/trunk/safekeep
Modified: safekeep/trunk/safekeep
===================================================================
--- safekeep/trunk/safekeep 2007-01-27 18:13:37 UTC (rev 321)
+++ safekeep/trunk/safekeep 2007-01-28 23:23:45 UTC (rev 322)
@@ -757,14 +757,14 @@
print '-v, --verbose increases the verbosity level'
print '-V, --version show the version number and exit'
print
+ print 'server options:'
+ print '-e, --email=EMAIL send results by email (can appear multiple times)'
+ print '-s, --smtp=SMTP SMTP server to use when sending mails (default: sendmail)'
+ print
print 'keys options:'
print '--status display the key status for the clients (default)'
print '--print display the authorization keys'
print '--deploy deploy the authorization keys'
- print
- print 'server options:'
- print '-e, --email=EMAIL send results by email (can appear multiple times)'
- print '-s, --smtp=SMTP SMTP server to use when sending mails (default: sendmail)'
if exitcode is not None: sys.exit(exitcode)
def main():
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <di...@us...> - 2007-01-27 18:13:41
|
Revision: 321
http://safekeep.svn.sourceforge.net/safekeep/?rev=321&view=rev
Author: dimi
Date: 2007-01-27 10:13:37 -0800 (Sat, 27 Jan 2007)
Log Message:
-----------
Remove the --client mode from the online help screen,
this is an internal-only mode, and it just makes the
output more confusing and difficult to read.
Modified Paths:
--------------
safekeep/trunk/doc/safekeep.txt
safekeep/trunk/safekeep
Modified: safekeep/trunk/doc/safekeep.txt
===================================================================
--- safekeep/trunk/doc/safekeep.txt 2007-01-27 18:10:33 UTC (rev 320)
+++ safekeep/trunk/doc/safekeep.txt 2007-01-27 18:13:37 UTC (rev 321)
@@ -9,10 +9,10 @@
--------
'safekeep' [--server] [-q] [-v] [-c file] [-e <email>] [-s <smtp>] <clientid>*
+'safekeep' --keys [-q] [-v] [-c file] [--status] [--print] [--deploy] <clientid>*
+
'safekeep' --client
-'safekeep' --keys [-q] [-v] [-c file] [--status] [--print] [--deploy] <clientid>*
-
'safekeep' -h | -V
DESCRIPTION
Modified: safekeep/trunk/safekeep
===================================================================
--- safekeep/trunk/safekeep 2007-01-27 18:10:33 UTC (rev 320)
+++ safekeep/trunk/safekeep 2007-01-27 18:13:37 UTC (rev 321)
@@ -744,28 +744,25 @@
def usage(exitcode=None):
print 'usage: %s [--server] [common options] [server options] <client-id>*' % (sys.argv[0])
- print ' %s --client [common options]' % (sys.argv[0])
print ' %s --keys [common options] [keys options] <client-id>*' % (sys.argv[0])
print
print 'mode selection (pick one):'
print '--server launch in server mode (default)'
- print '--client launch in client mode'
print '--keys launch in keys management mode'
print
print 'common options:'
+ print '-c, --conf=FILE|DIR use the given configuration file/directory'
print '-h, --help show this help message and exit'
print '-q, --quiet decreases the verbosity level'
print '-v, --verbose increases the verbosity level'
print '-V, --version show the version number and exit'
print
print 'keys options:'
- print '-c, --conf=FILE|DIR use the given configuration file/directory'
print '--status display the key status for the clients (default)'
print '--print display the authorization keys'
print '--deploy deploy the authorization keys'
print
print 'server options:'
- print '-c, --conf=FILE|DIR use the given configuration file/directory'
print '-e, --email=EMAIL send results by email (can appear multiple times)'
print '-s, --smtp=SMTP SMTP server to use when sending mails (default: sendmail)'
if exitcode is not None: sys.exit(exitcode)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <di...@us...> - 2007-01-27 18:10:39
|
Revision: 320
http://safekeep.svn.sourceforge.net/safekeep/?rev=320&view=rev
Author: dimi
Date: 2007-01-27 10:10:33 -0800 (Sat, 27 Jan 2007)
Log Message:
-----------
We need to support the -c/--conf in --keys mode too
Modified Paths:
--------------
safekeep/trunk/doc/safekeep.txt
safekeep/trunk/safekeep
Modified: safekeep/trunk/doc/safekeep.txt
===================================================================
--- safekeep/trunk/doc/safekeep.txt 2007-01-27 17:11:50 UTC (rev 319)
+++ safekeep/trunk/doc/safekeep.txt 2007-01-27 18:10:33 UTC (rev 320)
@@ -11,7 +11,7 @@
'safekeep' --client
-'safekeep' --keys [-q] [-v] [--status] [--print] [--deploy] <clientid>*
+'safekeep' --keys [-q] [-v] [-c file] [--status] [--print] [--deploy] <clientid>*
'safekeep' -h | -V
Modified: safekeep/trunk/safekeep
===================================================================
--- safekeep/trunk/safekeep 2007-01-27 17:11:50 UTC (rev 319)
+++ safekeep/trunk/safekeep 2007-01-27 18:10:33 UTC (rev 320)
@@ -759,6 +759,7 @@
print '-V, --version show the version number and exit'
print
print 'keys options:'
+ print '-c, --conf=FILE|DIR use the given configuration file/directory'
print '--status display the key status for the clients (default)'
print '--print display the authorization keys'
print '--deploy deploy the authorization keys'
@@ -826,9 +827,12 @@
if mode is not 'keys' and (keys_status or keys_print or keys_deploy):
usage(2)
- if mode is not 'server' and (cfglocs or email or smtp):
+ if mode is not 'server' and (email or smtp):
usage(2)
+ if mode is 'client' and cfglocs:
+ usage(2)
+
if len(cfglocs) == 0:
cfglocs.append(config_dir)
cfgs = parse_locs(cfglocs)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <di...@us...> - 2007-01-27 17:11:52
|
Revision: 319
http://safekeep.svn.sourceforge.net/safekeep/?rev=319&view=rev
Author: dimi
Date: 2007-01-27 09:11:50 -0800 (Sat, 27 Jan 2007)
Log Message:
-----------
Rename the -m option to -s, now that it's available.
Modified Paths:
--------------
safekeep/trunk/doc/safekeep.txt
safekeep/trunk/safekeep
Modified: safekeep/trunk/doc/safekeep.txt
===================================================================
--- safekeep/trunk/doc/safekeep.txt 2007-01-27 17:09:58 UTC (rev 318)
+++ safekeep/trunk/doc/safekeep.txt 2007-01-27 17:11:50 UTC (rev 319)
@@ -7,7 +7,7 @@
SYNOPSIS
--------
-'safekeep' [--server] [-q] [-v] [-c file] [-e <email>] [-m <smtp>] <clientid>*
+'safekeep' [--server] [-q] [-v] [-c file] [-e <email>] [-s <smtp>] <clientid>*
'safekeep' --client
@@ -97,9 +97,9 @@
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 using `/usr/sbin/sendmail`.
+-s, --smtp=SMTP::
+ Specifies the SMTP server used for sending mails when `-e` is used.
+ Defaults to using `/usr/sbin/sendmail`.
KEYS OPTIONS
------------
Modified: safekeep/trunk/safekeep
===================================================================
--- safekeep/trunk/safekeep 2007-01-27 17:09:58 UTC (rev 318)
+++ safekeep/trunk/safekeep 2007-01-27 17:11:50 UTC (rev 319)
@@ -766,12 +766,12 @@
print 'server options:'
print '-c, --conf=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: sendmail)'
+ print '-s, --smtp=SMTP SMTP server to use when sending mails (default: sendmail)'
if exitcode is not None: sys.exit(exitcode)
def main():
try:
- opts, args = getopt.getopt(sys.argv[1:], 'c:e:hm:qvV',
+ opts, args = getopt.getopt(sys.argv[1:], 'c:e:hs:qvV',
[ 'conf=', 'client', 'clientid=', 'deploy',
'email=', 'help', 'keys', 'print',
'quiet', 'server', 'smtp=', 'status',
@@ -795,7 +795,7 @@
email.append(a)
elif o in ('-h', '--help'):
usage(0)
- elif o in ('-m', '--smtp'):
+ elif o in ('-s', '--smtp'):
smtp = a
elif o in ('--server', ):
if mode: usage(2)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <di...@us...> - 2007-01-27 17:10:04
|
Revision: 318
http://safekeep.svn.sourceforge.net/safekeep/?rev=318&view=rev
Author: dimi
Date: 2007-01-27 09:09:58 -0800 (Sat, 27 Jan 2007)
Log Message:
-----------
Use sendmail is no SMTP server is specified.
Modified Paths:
--------------
safekeep/trunk/doc/safekeep.txt
safekeep/trunk/safekeep
Modified: safekeep/trunk/doc/safekeep.txt
===================================================================
--- safekeep/trunk/doc/safekeep.txt 2007-01-26 23:25:37 UTC (rev 317)
+++ safekeep/trunk/doc/safekeep.txt 2007-01-27 17:09:58 UTC (rev 318)
@@ -99,7 +99,7 @@
-m, --smtp=SMTP::
Specifies the SMTP server used for sending
- mails when `-e` is used. Defaults to `localhost`.
+ mails when `-e` is used. Defaults to using `/usr/sbin/sendmail`.
KEYS OPTIONS
------------
Modified: safekeep/trunk/safekeep
===================================================================
--- safekeep/trunk/safekeep 2007-01-26 23:25:37 UTC (rev 317)
+++ safekeep/trunk/safekeep 2007-01-27 17:09:58 UTC (rev 318)
@@ -84,11 +84,19 @@
hostname = socket.gethostname()
msg = 'From: SafeKeep@' + hostname + \
'\r\nTo: ' + ', '.join(email) + \
- '\r\nSubject: SafeKeep results on ' + hostname + \
- '\r\n\r\n' + '\n'.join(logbuf)
- server = smtplib.SMTP(smtp)
- server.sendmail('SafeKeep@' + hostname, email, msg)
- server.quit()
+ '\r\nSubject: SafeKeep results for ' + hostname + \
+ '\r\n\r\n' + '\r\n'.join(logbuf)
+ if smtp:
+ server = smtplib.SMTP(smtp)
+ server.sendmail('SafeKeep@' + hostname, email, msg)
+ server.quit()
+ else:
+ cmd = '/usr/sbin/sendmail -t'
+ pin = os.popen(cmd, 'w')
+ try:
+ pin.write(msg)
+ finally:
+ pin.close()
def is_temp_root(dir):
return dir != '/'
@@ -758,7 +766,7 @@
print 'server options:'
print '-c, --conf=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 '-m, --smtp=SMTP SMTP server to use when sending mails (default: sendmail)'
if exitcode is not None: sys.exit(exitcode)
def main():
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <di...@us...> - 2007-01-26 23:25:39
|
Revision: 317
http://safekeep.svn.sourceforge.net/safekeep/?rev=317&view=rev
Author: dimi
Date: 2007-01-26 15:25:37 -0800 (Fri, 26 Jan 2007)
Log Message:
-----------
Use the standard os.getenv() instead our ad-hoc version
Modified Paths:
--------------
safekeep/trunk/safekeep
Modified: safekeep/trunk/safekeep
===================================================================
--- safekeep/trunk/safekeep 2007-01-26 23:16:44 UTC (rev 316)
+++ safekeep/trunk/safekeep 2007-01-26 23:25:37 UTC (rev 317)
@@ -100,11 +100,6 @@
if path.startswith('/'): return root + path
return os.path.join(root, path)
-def getenv(var, defval=None):
- val = os.environ.get(var)
- if val is None: return defval
- return val
-
######################################################################
# Configuration file parser
######################################################################
@@ -168,7 +163,7 @@
host = user = key_ctrl = key_data = None
if host and not user:
user = 'root'
- home = getenv('HOME', '/root')
+ home = os.getenv('HOME', '/root')
if host and not key_ctrl:
key_ctrl = os.path.join(home, '.ssh', 'safekeep-server-ctrl-key')
if host and not key_data:
@@ -627,7 +622,7 @@
if deploy:
info('%s: Key do not exist, generating it now: %s' % (id, privatekeyfile))
gencmd = 'ssh-keygen -q -b 1024 -t dsa -N "" -C "SafeKeep auto generated key at %s@%s" -f %s' % \
- (getenv('LOGNAME', 'root'), os.uname()[1], privatekeyfile)
+ (os.getenv('LOGNAME', 'root'), os.uname()[1], privatekeyfile)
debug(gencmd)
if os.system(gencmd):
error('%s: Failed to generate key %s. Skipping client.' % (id, privatekeyfile))
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <di...@us...> - 2007-01-26 23:16:45
|
Revision: 316
http://safekeep.svn.sourceforge.net/safekeep/?rev=316&view=rev
Author: dimi
Date: 2007-01-26 15:16:44 -0800 (Fri, 26 Jan 2007)
Log Message:
-----------
Document some more realistic configuration examples.
Modified Paths:
--------------
safekeep/trunk/doc/safekeep.txt
Modified: safekeep/trunk/doc/safekeep.txt
===================================================================
--- safekeep/trunk/doc/safekeep.txt 2007-01-26 22:17:02 UTC (rev 315)
+++ safekeep/trunk/doc/safekeep.txt 2007-01-26 23:16:44 UTC (rev 316)
@@ -116,77 +116,70 @@
--deploy::
Deploy the authorization keys on the clients.
-
CONFIGURATION
-------------
-Each backup client is described by a configuration file in XML format of the
-following form:
-
+Normally the configuration files are placed in the `/etc/safekeep.d/` directory
+from where they will get picked up automatically by SafeKeep. Each backup
+client is described by a configuration file in XML format. The minimum
+configuration file is:
------------------------------------------------------------------------
-<!-- the client backup id -->
-<backup id="my_workstation">
+<backup>
+ <host name="my_workstation" />
+</backup>
+------------------------------------------------------------------------
+This will simply backup all relevant files (excluding temporary files,
+caches, etc) from the client with the address `my_workstation`.
- <!-- the client backup host, the user under which the servers will connect,
- the SSH keys used for launching "safekeep --client" and "rdiff-backup" -->
- <host
- name="my_workstation.corp.com" user="root"
- key-ctrl="/home/jdoe/.ssh/backup_id_dsa"
- key-data="/home/jdoe/.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="./data"
- retention="10D"
- />
-
- <!-- settings for database dump and for volume snapshot -->
+A more realistic example:
+------------------------------------------------------------------------
+<backup>
+ <host name="my_workstation" />
+ <repo retention="10D" />
<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"
- />
-
+ <dump type="postgres" user="postgres" file="/var/lib/pgsql/backups/all_dbs" />
+ <snapshot device="/dev/mapper/VolGroup00-LogVol00" 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"/>
+ <exclude regexp=".*\.ogg"/>
+ <exclude regexp=".*\.mp3"/>
- <include glob="**/important/"/>
+ <include path="/etc"/>
+
<exclude glob="/home/*/tmp"/>
+ <include path="/home"/>
- <include regexp=".*\.ogg"/>
- <exclude regexp=".*\.mp3"/>
+ <include path="/root"/>
+
+ <include path="/srv"/>
+
+ <exclude path="/var/cache"/>
+ <exclude path="/var/lock"/>
+ <exclude path="/var/run"/>
+ <exclude path="/var/tmp"/>
+ <include path="/var"/>
</data>
</backup>
------------------------------------------------------------------------
+In this case, SafeKeep will dump all databases managed by PostgreSQL,
+snapshot the disk via LVM, and proceed to backup `/etc`, `/home`,
+`/root`, `/srv`, `/var`, while excluding some unneeded files and
+directories. Older data will be retained for 10 days.
-Normally the configuration files are placed in the `/etc/safekeep.d/` directory
-from where they will get picked up automatically by SafeKeep.
+For full reference documentation of the configuration format, see
+safekeep.conf(5).
+CLIENT IDS
+----------
+Normally the client IDs are generated automatically from the configuration
+filenames without the extension. E.g. if a configuration file is named
+`my_workstation.conf`, the client ID becomes `my_workstation`. For more
+information on this topic, see safekeep.conf(5).
+
SEE ALSO
--------
-rdiff-backup(1)
+rdiff-backup(1), safekeep.conf(5)
AUTHOR
------
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <di...@us...> - 2007-01-26 22:17:04
|
Revision: 315
http://safekeep.svn.sourceforge.net/safekeep/?rev=315&view=rev
Author: dimi
Date: 2007-01-26 14:17:02 -0800 (Fri, 26 Jan 2007)
Log Message:
-----------
Protect against duplicated client IDs
Modified Paths:
--------------
safekeep/trunk/safekeep
Modified: safekeep/trunk/safekeep
===================================================================
--- safekeep/trunk/safekeep 2007-01-26 22:04:13 UTC (rev 314)
+++ safekeep/trunk/safekeep 2007-01-26 22:17:02 UTC (rev 315)
@@ -257,6 +257,8 @@
finally:
dom.unlink()
cfg['text'] = cfg_str
+ if cfg['id'] in cfgs:
+ raise ConfigException('Duplicate client ID: %s' % cfg['id'])
cfgs[cfg['id']] = cfg
return cfgs
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <di...@us...> - 2007-01-26 22:04:14
|
Revision: 314
http://safekeep.svn.sourceforge.net/safekeep/?rev=314&view=rev
Author: dimi
Date: 2007-01-26 14:04:13 -0800 (Fri, 26 Jan 2007)
Log Message:
-----------
Cleanup a bit the sample file
Modified Paths:
--------------
safekeep/trunk/sample.conf
Modified: safekeep/trunk/sample.conf
===================================================================
--- safekeep/trunk/sample.conf 2007-01-26 22:02:56 UTC (rev 313)
+++ safekeep/trunk/sample.conf 2007-01-26 22:04:13 UTC (rev 314)
@@ -1,18 +1,18 @@
<!-- the client backup id -->
-<backup id="my.host.com primary backup">
+<backup id="my_workstation">
<!-- 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"
+ name="my_box.corp.com" user="root"
+ key-ctrl="/home/jdoe/.ssh/backup_id_dsa"
+ key-data="/home/jdoe/.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"
+ path="./data"
retention="10D"
/>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <di...@us...> - 2007-01-26 22:03:00
|
Revision: 313
http://safekeep.svn.sourceforge.net/safekeep/?rev=313&view=rev
Author: dimi
Date: 2007-01-26 14:02:56 -0800 (Fri, 26 Jan 2007)
Log Message:
-----------
Rename the .cfg extension to .conf, and the --cfg option to --conf
Modified Paths:
--------------
safekeep/trunk/debian/docs
safekeep/trunk/doc/safekeep.txt
safekeep/trunk/safekeep
safekeep/trunk/safekeep-test
safekeep/trunk/safekeep.spec.in
Added Paths:
-----------
safekeep/trunk/sample.conf
Removed Paths:
-------------
safekeep/trunk/sample.cfg
Modified: safekeep/trunk/debian/docs
===================================================================
--- safekeep/trunk/debian/docs 2007-01-26 21:46:41 UTC (rev 312)
+++ safekeep/trunk/debian/docs 2007-01-26 22:02:56 UTC (rev 313)
@@ -3,4 +3,4 @@
LICENSE
README
safekeep-test
-sample.cfg
+sample.conf
Modified: safekeep/trunk/doc/safekeep.txt
===================================================================
--- safekeep/trunk/doc/safekeep.txt 2007-01-26 21:46:41 UTC (rev 312)
+++ safekeep/trunk/doc/safekeep.txt 2007-01-26 22:02:56 UTC (rev 313)
@@ -82,7 +82,7 @@
SERVER OPTIONS
--------------
--c, --cfg=FILE|DIR::
+-c, --conf=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
Modified: safekeep/trunk/safekeep
===================================================================
--- safekeep/trunk/safekeep 2007-01-26 21:46:41 UTC (rev 312)
+++ safekeep/trunk/safekeep 2007-01-26 22:02:56 UTC (rev 313)
@@ -6,7 +6,7 @@
import socket, smtplib
config_dir = '/etc/safekeep.d'
-config_ext = '.cfg'
+config_ext = '.conf'
logbuf = []
is_client = False
verbosity_level = 1
@@ -759,7 +759,7 @@
print '--deploy deploy the authorization keys'
print
print 'server options:'
- print '-c, --cfg=FILE|DIR use the given configuration file/directory'
+ print '-c, --conf=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)'
if exitcode is not None: sys.exit(exitcode)
@@ -767,7 +767,7 @@
def main():
try:
opts, args = getopt.getopt(sys.argv[1:], 'c:e:hm:qvV',
- [ 'cfg=', 'client', 'clientid=', 'deploy',
+ [ 'conf=', 'client', 'clientid=', 'deploy',
'email=', 'help', 'keys', 'print',
'quiet', 'server', 'smtp=', 'status',
'verbose', 'version'])
@@ -784,7 +784,7 @@
keys_print = None
keys_deploy = None
for o, a in opts:
- if o in ('-c', '--cfg'):
+ if o in ('-c', '--conf'):
cfglocs.append(a)
elif o in ('-e', '--email'):
email.append(a)
@@ -836,7 +836,7 @@
if arg in cfgs: continue
error('Unknown client ID: %s' % arg)
if os.path.isfile(arg):
- error('It appears to be a file, configuration files are passed via the -c/--cfg switch.')
+ error('It appears to be a file, configuration files are passed via the -c/--conf switch.')
ok = False
if not ok: sys.exit(2)
Modified: safekeep/trunk/safekeep-test
===================================================================
--- safekeep/trunk/safekeep-test 2007-01-26 21:46:41 UTC (rev 312)
+++ safekeep/trunk/safekeep-test 2007-01-26 22:02:56 UTC (rev 313)
@@ -133,7 +133,7 @@
</data>
</backup>
"""
- writefile(os.path.join(tmproot, 'test.cfg'), CONFIG % params)
+ writefile(os.path.join(tmproot, 'test.conf'), CONFIG % params)
for i in xrange(test_reps):
FILES = (
'data/fileA.out',
@@ -149,7 +149,7 @@
cmd = "cd %(tmproot)s/client; find -type f -a \! -name '*.nobackup' | sort | xargs md5sum > %(tmproot)s/md5sums.client"
if os.system(cmd % params):
raise TestFailure("Can't compute the source MD5 sums")
- cmd = "safekeep %(args)s --cfg '%(tmproot)s/test.cfg'"
+ cmd = "safekeep %(args)s --conf '%(tmproot)s/test.conf'"
if os.system(cmd % params):
raise TestFailure("Can't backup files")
os.mkdir(os.path.join(tmproot, 'restore'))
@@ -314,10 +314,10 @@
'mv -f .ssh/known_hosts.new .ssh/known_hosts'
rcmdin(cmd, fingerprint, 'backup-op', server, 'deploy client fingerprint on server')
- snap_cfg = ''
+ snap_conf = ''
if perform_snapshots:
- snap_cfg = '<snapshot device="/dev/mapper/VolGroup00-LogVol00" size="50M"/>'
- cfg = """
+ snap_conf = '<snapshot device="/dev/mapper/VolGroup00-LogVol00" size="50M"/>'
+ conf = """
<backup id="test-client">
<host name="%s" key-data="%s" />
<repo path="/home/backup-op/client/data" retention="5h"/>
@@ -333,9 +333,9 @@
<include path="/srv" />
</data>
</backup>
- """ % (client, key_data, snap_cfg)
+ """ % (client, key_data, snap_conf)
- writefile('/etc/safekeep.d/test-client.cfg', cfg, '664', 'w', 'root', server)
+ writefile('/etc/safekeep.d/test-client.conf', conf, '664', 'w', 'root', server)
cmd = 'rm -rf client; mkdir -p client/data'
rcmd(cmd, 'backup-op', server, 'create data repo')
Modified: safekeep/trunk/safekeep.spec.in
===================================================================
--- safekeep/trunk/safekeep.spec.in 2007-01-26 21:46:41 UTC (rev 312)
+++ safekeep/trunk/safekeep.spec.in 2007-01-26 22:02:56 UTC (rev 313)
@@ -45,7 +45,7 @@
%dir %{_sysconfdir}/safekeep.d
%{_bindir}/safekeep
%{_mandir}/man1/safekeep.1*
-%doc AUTHORS COPYING LICENSE README safekeep-test sample.cfg
+%doc AUTHORS COPYING LICENSE README safekeep-test sample.conf
%changelog
Deleted: safekeep/trunk/sample.cfg
===================================================================
--- safekeep/trunk/sample.cfg 2007-01-26 21:46:41 UTC (rev 312)
+++ safekeep/trunk/sample.cfg 2007-01-26 22:02:56 UTC (rev 313)
@@ -1,55 +0,0 @@
-<!-- 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>
Copied: safekeep/trunk/sample.conf (from rev 301, safekeep/trunk/sample.cfg)
===================================================================
--- safekeep/trunk/sample.conf (rev 0)
+++ safekeep/trunk/sample.conf 2007-01-26 22:02:56 UTC (rev 313)
@@ -0,0 +1,55 @@
+<!-- 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>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <di...@us...> - 2007-01-26 21:46:42
|
Revision: 312
http://safekeep.svn.sourceforge.net/safekeep/?rev=312&view=rev
Author: dimi
Date: 2007-01-26 13:46:41 -0800 (Fri, 26 Jan 2007)
Log Message:
-----------
Rename the -C option to -c now that it is available.
Modified Paths:
--------------
safekeep/trunk/doc/safekeep.txt
safekeep/trunk/safekeep
safekeep/trunk/safekeep-test
Modified: safekeep/trunk/doc/safekeep.txt
===================================================================
--- safekeep/trunk/doc/safekeep.txt 2007-01-26 21:16:33 UTC (rev 311)
+++ safekeep/trunk/doc/safekeep.txt 2007-01-26 21:46:41 UTC (rev 312)
@@ -7,7 +7,7 @@
SYNOPSIS
--------
-'safekeep' [--server] [-q] [-v] [-C file] [-e <email>] [-m <smtp>] <clientid>*
+'safekeep' [--server] [-q] [-v] [-c file] [-e <email>] [-m <smtp>] <clientid>*
'safekeep' --client
@@ -82,7 +82,7 @@
SERVER OPTIONS
--------------
--C, --cfg=FILE|DIR::
+-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
Modified: safekeep/trunk/safekeep
===================================================================
--- safekeep/trunk/safekeep 2007-01-26 21:16:33 UTC (rev 311)
+++ safekeep/trunk/safekeep 2007-01-26 21:46:41 UTC (rev 312)
@@ -759,14 +759,14 @@
print '--deploy deploy the authorization keys'
print
print 'server options:'
- print '-C, --cfg=FILE|DIR use the given configuration file/directory'
+ 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)'
if exitcode is not None: sys.exit(exitcode)
def main():
try:
- opts, args = getopt.getopt(sys.argv[1:], 'C:e:hm:qvV',
+ opts, args = getopt.getopt(sys.argv[1:], 'c:e:hm:qvV',
[ 'cfg=', 'client', 'clientid=', 'deploy',
'email=', 'help', 'keys', 'print',
'quiet', 'server', 'smtp=', 'status',
@@ -784,7 +784,7 @@
keys_print = None
keys_deploy = None
for o, a in opts:
- if o in ('-C', '--cfg'):
+ if o in ('-c', '--cfg'):
cfglocs.append(a)
elif o in ('-e', '--email'):
email.append(a)
@@ -836,7 +836,7 @@
if arg in cfgs: continue
error('Unknown client ID: %s' % arg)
if os.path.isfile(arg):
- error('It appears to be a file, configuration files are passed via the -C/--cfg switch.')
+ error('It appears to be a file, configuration files are passed via the -c/--cfg switch.')
ok = False
if not ok: sys.exit(2)
Modified: safekeep/trunk/safekeep-test
===================================================================
--- safekeep/trunk/safekeep-test 2007-01-26 21:16:33 UTC (rev 311)
+++ safekeep/trunk/safekeep-test 2007-01-26 21:46:41 UTC (rev 312)
@@ -211,7 +211,7 @@
def createKey(user, host, keyname, comment):
key = '/home/%s/.ssh/%s' % (user, keyname)
- cmd = 'test -f %s || ssh-keygen -q -b 1024 -t dsa -N \'\' -C \'%s\' -f %s' % (key, comment, key)
+ cmd = 'test -f %s || ssh-keygen -q -b 1024 -t dsa -N \'\' -c \'%s\' -f %s' % (key, comment, key)
rcmd(cmd, user, host, 'create %s on server' % keyname)
return key
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <di...@us...> - 2007-01-26 21:16:38
|
Revision: 311
http://safekeep.svn.sourceforge.net/safekeep/?rev=311&view=rev
Author: dimi
Date: 2007-01-26 13:16:33 -0800 (Fri, 26 Jan 2007)
Log Message:
-----------
Cleanup the docs a bit
Modified Paths:
--------------
safekeep/trunk/doc/safekeep.txt
Modified: safekeep/trunk/doc/safekeep.txt
===================================================================
--- safekeep/trunk/doc/safekeep.txt 2007-01-26 21:13:27 UTC (rev 310)
+++ safekeep/trunk/doc/safekeep.txt 2007-01-26 21:16:33 UTC (rev 311)
@@ -125,20 +125,20 @@
------------------------------------------------------------------------
<!-- the client backup id -->
-<backup id="my.host.com primary backup">
+<backup id="my_workstation">
<!-- the client backup host, the user under which the servers will connect,
the SSH keys used for launching "safekeep --client" and "rdiff-backup" -->
<host
- name="localhost" user="guest"
- key-ctrl="/home/dimi/.ssh/backup_id_dsa"
- key-data="/home/dimi/.ssh/backup2_id_dsa"
+ name="my_workstation.corp.com" user="root"
+ key-ctrl="/home/jdoe/.ssh/backup_id_dsa"
+ key-data="/home/jdoe/.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"
+ path="./data"
retention="10D"
/>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <di...@us...> - 2007-01-26 21:13:30
|
Revision: 310
http://safekeep.svn.sourceforge.net/safekeep/?rev=310&view=rev
Author: dimi
Date: 2007-01-26 13:13:27 -0800 (Fri, 26 Jan 2007)
Log Message:
-----------
Merge the doc Makefile into the main Makefile.
It makes it easier if everything is in one place.
http://members.canb.auug.org.au/~millerp/rmch/recu-make-cons-harm.html
Modified Paths:
--------------
safekeep/trunk/Makefile
Removed Paths:
-------------
safekeep/trunk/doc/Makefile
Modified: safekeep/trunk/Makefile
===================================================================
--- safekeep/trunk/Makefile 2007-01-26 20:35:46 UTC (rev 309)
+++ safekeep/trunk/Makefile 2007-01-26 21:13:27 UTC (rev 310)
@@ -10,13 +10,18 @@
dirname := $(shell basename $(PWD))
rpmroot := $(shell grep '%_topdir' ~/.rpmmacros | sed 's/^[^ \t]*[ \t]*//')
svnroot := $(shell LANG=C svn info |grep Root |cut -c 18-)
+MAN_TXT := doc/safekeep.txt
+DOC_HTML := $(patsubst %.txt,%.html,$(MAN_TXT))
+DOC_MAN := $(patsubst %.txt,%.1,$(MAN_TXT))
+
all: help
help:
@echo "Targets:"
@echo " help Displays this message"
@echo " info Displays package information (version, tag, etc.)"
+ @echo " docs Builds all documentation formats"
@echo " build Builds everything needed for an installation"
@echo " deb Builds snapshot binary and source DEBs"
@echo " rpm Buidls snapshot binary and source RPMs"
@@ -34,9 +39,9 @@
@echo "RPM Root = $(rpmroot)"
@echo "SVN Root = $(svnroot)"
-build:
- $(MAKE) -C doc build
+build: docs
+
release: check-info commit-release tag-release rpm-release
commit-release:
@@ -49,6 +54,23 @@
@echo -n 'Is this information correct? (yes/No) '
@read x; if [ "$$x" != "yes" ]; then exit 1; fi
+docs: html man
+
+html: $(DOC_HTML)
+
+man: $(DOC_MAN)
+
+%.html: %.txt
+ asciidoc -b xhtml11 -d manpage -f doc/asciidoc.conf $<
+
+%.1: %.xml
+ xmlto -o doc -m doc/callouts.xsl man $<
+
+%.xml: %.txt
+ asciidoc -b docbook -d manpage -f doc/asciidoc.conf $<
+
+$(DOC_HTML) $(DOC_MAN): doc/asciidoc.conf
+
tar: tar-snapshot
tar-snapshot:
@@ -96,6 +118,6 @@
safekeep-test --remote
clean:
- $(MAKE) -C doc clean
- rm -rf `find -name "*.py[co]" -o -name "*~"```
+ rm -f {.,doc,debian}/*~ *.py[co]
rm -f $(name).spec debian/changelog
+ rm -f doc/*.xml doc/*.html doc/*.1
Deleted: safekeep/trunk/doc/Makefile
===================================================================
--- safekeep/trunk/doc/Makefile 2007-01-26 20:35:46 UTC (rev 309)
+++ safekeep/trunk/doc/Makefile 2007-01-26 21:13:27 UTC (rev 310)
@@ -1,25 +0,0 @@
-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 $<
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <di...@us...> - 2007-01-26 20:35:49
|
Revision: 309
http://safekeep.svn.sourceforge.net/safekeep/?rev=309&view=rev
Author: dimi
Date: 2007-01-26 12:35:46 -0800 (Fri, 26 Jan 2007)
Log Message:
-----------
Less confusing name
Modified Paths:
--------------
safekeep/trunk/safekeep
Modified: safekeep/trunk/safekeep
===================================================================
--- safekeep/trunk/safekeep 2007-01-26 20:28:01 UTC (rev 308)
+++ safekeep/trunk/safekeep 2007-01-26 20:35:46 UTC (rev 309)
@@ -152,11 +152,11 @@
raise ConfigException('Empty ' + clude_el.tagName)
return { 'type' : clude_el.tagName, 'path' : path, 'glob' : glob, 'regexp' : regexp }
-def parse_config(backup_el, filename):
+def parse_config(backup_el, dflt_id):
if backup_el.tagName != 'backup':
raise ConfigException('Invalid config file, the top level element must be <backup>')
id = backup_el.getAttribute('id')
- if not id: id = filename
+ if not id: id = dflt_id
host_el = backup_el.getElementsByTagName('host')
if host_el:
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <di...@us...> - 2007-01-26 20:28:06
|
Revision: 308
http://safekeep.svn.sourceforge.net/safekeep/?rev=308&view=rev
Author: dimi
Date: 2007-01-26 12:28:01 -0800 (Fri, 26 Jan 2007)
Log Message:
-----------
Update documentation
Modified Paths:
--------------
safekeep/trunk/doc/safekeep.txt
Modified: safekeep/trunk/doc/safekeep.txt
===================================================================
--- safekeep/trunk/doc/safekeep.txt 2007-01-26 19:03:51 UTC (rev 307)
+++ safekeep/trunk/doc/safekeep.txt 2007-01-26 20:28:01 UTC (rev 308)
@@ -7,7 +7,7 @@
SYNOPSIS
--------
-'safekeep' [--server] [-q] [-v] [-C file] [-e <email>] [-m <smtp>]
+'safekeep' [--server] [-q] [-v] [-C file] [-e <email>] [-m <smtp>] <clientid>*
'safekeep' --client
@@ -25,7 +25,7 @@
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
+system previously set up using `safekeep -keys --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.
@@ -41,6 +41,11 @@
The SSH key management mode is a helper mode for deploying or verifying
the setup of the SSH authentification keys.
+In both server and keys management mode, you can restrict the operation
+to a specific set of clients by listing the desired client IDs as
+arguments. If no client ID is given, SafeKeep will operate over all known
+clients.
+
Each mode accepts a few options as described below.
OPERATION MODE
@@ -81,7 +86,10 @@
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)
+ backup client). Can be specified multiple times.
+ If not specified at all, SafeKeep will default to searching
+ `/etc/safekeep.d/` for configuration files.
+ Simply using this default is the recommended usage.
-e, --email=EMAIL::
In addition to writing the session logs
@@ -108,9 +116,10 @@
--deploy::
Deploy the authorization keys on the clients.
-Configuration file
-------------------
+CONFIGURATION
+-------------
+
Each backup client is described by a configuration file in XML format of the
following form:
@@ -119,7 +128,7 @@
<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" -->
+ the SSH keys used for launching "safekeep --client" and "rdiff-backup" -->
<host
name="localhost" user="guest"
key-ctrl="/home/dimi/.ssh/backup_id_dsa"
@@ -172,11 +181,14 @@
</backup>
------------------------------------------------------------------------
-See Also
+Normally the configuration files are placed in the `/etc/safekeep.d/` directory
+from where they will get picked up automatically by SafeKeep.
+
+SEE ALSO
--------
rdiff-backup(1)
-Author
+AUTHOR
------
Written by Dimi Paun <di...@la...> and Stelian Pop <st...@la...>.
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <di...@us...> - 2007-01-26 19:03:53
|
Revision: 307
http://safekeep.svn.sourceforge.net/safekeep/?rev=307&view=rev
Author: dimi
Date: 2007-01-26 11:03:51 -0800 (Fri, 26 Jan 2007)
Log Message:
-----------
Cleanup code, we check now the arguments ahead of time.
Modified Paths:
--------------
safekeep/trunk/safekeep
Modified: safekeep/trunk/safekeep
===================================================================
--- safekeep/trunk/safekeep 2007-01-26 18:40:11 UTC (rev 306)
+++ safekeep/trunk/safekeep 2007-01-26 19:03:51 UTC (rev 307)
@@ -599,12 +599,10 @@
debug('Server backup done')
def do_keys(cfgs, ids, status, dump, deploy):
- matches = []
for cfg in cfgs.itervalues():
id = cfg['id']
if ids and id not in ids: continue
info('Handling keys for client: %s' % id)
- matches.append(id)
if not cfg['host']:
info('%s: Client is local, it needs no keys' % id)
continue
@@ -679,9 +677,6 @@
if pipe.close():
error('Failed to deliver the keys to the client')
- for id in ids:
- if id not in matches:
- error('No client with id \'%s\'' % id)
# parses authozied_keys, see sshd(8) man page for details
def parse_authorized_keys(keystext):
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <di...@us...> - 2007-01-26 18:40:15
|
Revision: 306
http://safekeep.svn.sourceforge.net/safekeep/?rev=306&view=rev
Author: dimi
Date: 2007-01-26 10:40:11 -0800 (Fri, 26 Jan 2007)
Log Message:
-----------
Add support for filtering by client-ids in server mode
Modified Paths:
--------------
safekeep/trunk/safekeep
Modified: safekeep/trunk/safekeep
===================================================================
--- safekeep/trunk/safekeep 2007-01-26 18:27:05 UTC (rev 305)
+++ safekeep/trunk/safekeep 2007-01-26 18:40:11 UTC (rev 306)
@@ -525,9 +525,13 @@
if server_major != client_major:
raise Exception('Incompatible protocols: %s <> %s' % (PROTOCOL, client_protocol))
-def do_server(cfgs):
+def do_server(cfgs, ids):
debug("Do server main loop")
for cfg in cfgs.itervalues():
+ id = cfg['id']
+ if ids and id not in ids: continue
+ info('Server backup starting for client: %s' % id)
+
if cfg['host']:
if not os.path.isfile(cfg['key_ctrl']):
warn('Client %(id)s missing ctrl key %(key_ctrl)s, skipping' % cfg)
@@ -540,8 +544,6 @@
if cfg['retention'] and os.path.isdir(rdiff_logdir):
do_server_data_cleanup(cfg)
- debug('Do server backup [' + cfg['id'] + ']')
-
if cfg['host']:
cmd = 'ssh -T -i %(key_ctrl)s -l %(user)s %(host)s' % cfg
else:
@@ -554,7 +556,7 @@
client_versions = do_server_getanswer(cout)
do_server_compat(client_versions)
- cin.write('CONFIG: %d: %s\n' % (len(cfg['text'].splitlines()), cfg['id']))
+ cin.write('CONFIG: %d: %s\n' % (len(cfg['text'].splitlines()), id))
cin.write(cfg['text'] + '\n')
cin.flush()
do_server_getanswer(cout)
@@ -592,7 +594,7 @@
cin.flush()
do_server_getanswer(cout)
- debug('Server backup [' + cfg['id'] + '] done')
+ debug('Server backup done for client: %s' % id)
debug('Server backup done')
@@ -741,9 +743,9 @@
######################################################################
def usage(exitcode=None):
- print 'usage: %s [--server] [common options] [server options]' % (sys.argv[0])
+ print 'usage: %s [--server] [common options] [server options] <client-id>*' % (sys.argv[0])
print ' %s --client [common options]' % (sys.argv[0])
- print ' %s --keys [common options] [keys options] [clientid1 [clientid2] ...]' % (sys.argv[0])
+ print ' %s --keys [common options] [keys options] <client-id>*' % (sys.argv[0])
print
print 'mode selection (pick one):'
print '--server launch in server mode (default)'
@@ -848,7 +850,7 @@
if mode is 'server':
is_client = False
verbosity_level = 1 + verbosity
- do_server(cfgs)
+ do_server(cfgs, args)
elif mode is 'client':
is_client = True
verbosity_level = 3 + verbosity
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <di...@us...> - 2007-01-26 18:27:06
|
Revision: 305
http://safekeep.svn.sourceforge.net/safekeep/?rev=305&view=rev
Author: dimi
Date: 2007-01-26 10:27:05 -0800 (Fri, 26 Jan 2007)
Log Message:
-----------
Complain if inappropriate options are used in selected mode
Modified Paths:
--------------
safekeep/trunk/safekeep
Modified: safekeep/trunk/safekeep
===================================================================
--- safekeep/trunk/safekeep 2007-01-26 18:18:57 UTC (rev 304)
+++ safekeep/trunk/safekeep 2007-01-26 18:27:05 UTC (rev 305)
@@ -820,6 +820,13 @@
if mode is None:
mode = 'server'
+
+ if mode is not 'keys' and (keys_status or keys_print or keys_deploy):
+ usage(2)
+
+ if mode is not 'server' and (cfglocs or email or smtp):
+ usage(2)
+
if len(cfglocs) == 0:
cfglocs.append(config_dir)
cfgs = parse_locs(cfglocs)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <di...@us...> - 2007-01-26 18:19:03
|
Revision: 304
http://safekeep.svn.sourceforge.net/safekeep/?rev=304&view=rev
Author: dimi
Date: 2007-01-26 10:18:57 -0800 (Fri, 26 Jan 2007)
Log Message:
-----------
Validate arguments as clientIDs where appropriate
Modified Paths:
--------------
safekeep/trunk/safekeep
Modified: safekeep/trunk/safekeep
===================================================================
--- safekeep/trunk/safekeep 2007-01-26 18:10:35 UTC (rev 303)
+++ safekeep/trunk/safekeep 2007-01-26 18:18:57 UTC (rev 304)
@@ -818,12 +818,24 @@
print 'safekeep', VERSION
return
+ if mode is None:
+ mode = 'server'
if len(cfglocs) == 0:
cfglocs.append(config_dir)
- if mode is None:
- mode = 'server'
+ cfgs = parse_locs(cfglocs)
- cfgs = parse_locs(cfglocs)
+ if mode is 'client':
+ if len(args) > 0: usage(2)
+ else:
+ ok = True
+ for arg in args:
+ if arg in cfgs: continue
+ error('Unknown client ID: %s' % arg)
+ if os.path.isfile(arg):
+ error('It appears to be a file, configuration files are passed via the -C/--cfg switch.')
+ ok = False
+ if not ok: sys.exit(2)
+
try:
global is_client, verbosity_level
if mode is 'server':
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <di...@us...> - 2007-01-26 18:10:40
|
Revision: 303
http://safekeep.svn.sourceforge.net/safekeep/?rev=303&view=rev
Author: dimi
Date: 2007-01-26 10:10:35 -0800 (Fri, 26 Jan 2007)
Log Message:
-----------
Transform the list of configurations into a dictionary.
It should make it easier to look through the known ids.
Modified Paths:
--------------
safekeep/trunk/safekeep
Modified: safekeep/trunk/safekeep
===================================================================
--- safekeep/trunk/safekeep 2007-01-26 16:47:13 UTC (rev 302)
+++ safekeep/trunk/safekeep 2007-01-26 18:10:35 UTC (rev 303)
@@ -243,7 +243,7 @@
else:
print >> sys.stderr, 'Inaccessible configuration, ignoring:', cfg
- cfgs = []
+ cfgs = {}
for filepath in cfgfiles:
filename = os.path.splitext(os.path.basename(filepath))[0]
@@ -257,7 +257,7 @@
finally:
dom.unlink()
cfg['text'] = cfg_str
- cfgs.append(cfg)
+ cfgs[cfg['id']] = cfg
return cfgs
@@ -527,7 +527,7 @@
def do_server(cfgs):
debug("Do server main loop")
- for cfg in cfgs:
+ for cfg in cfgs.itervalues():
if cfg['host']:
if not os.path.isfile(cfg['key_ctrl']):
warn('Client %(id)s missing ctrl key %(key_ctrl)s, skipping' % cfg)
@@ -598,7 +598,7 @@
def do_keys(cfgs, ids, status, dump, deploy):
matches = []
- for cfg in cfgs:
+ for cfg in cfgs.itervalues():
id = cfg['id']
if ids and id not in ids: continue
info('Handling keys for client: %s' % id)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <di...@us...> - 2007-01-26 16:48:19
|
Revision: 302
http://safekeep.svn.sourceforge.net/safekeep/?rev=302&view=rev
Author: dimi
Date: 2007-01-26 08:47:13 -0800 (Fri, 26 Jan 2007)
Log Message:
-----------
Default to server mode only at the end. Small cleanups.
Modified Paths:
--------------
safekeep/trunk/safekeep
Modified: safekeep/trunk/safekeep
===================================================================
--- safekeep/trunk/safekeep 2007-01-26 16:33:10 UTC (rev 301)
+++ safekeep/trunk/safekeep 2007-01-26 16:47:13 UTC (rev 302)
@@ -777,7 +777,7 @@
except getopt.GetoptError:
usage(2)
- mode = 'server'
+ mode = None
email = []
smtp = ''
cfglocs = []
@@ -820,19 +820,21 @@
if len(cfglocs) == 0:
cfglocs.append(config_dir)
+ if mode is None:
+ mode = 'server'
cfgs = parse_locs(cfglocs)
try:
global is_client, verbosity_level
- if mode == 'server':
+ if mode is 'server':
is_client = False
verbosity_level = 1 + verbosity
do_server(cfgs)
- elif mode == 'client':
+ elif mode is 'client':
is_client = True
verbosity_level = 3 + verbosity
do_client()
- elif mode == 'keys':
+ elif mode is 'keys':
is_client = False
verbosity_level = 1 + verbosity
if not keys_status and not keys_print and not keys_deploy:
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <di...@us...> - 2007-01-26 16:33:23
|
Revision: 301
http://safekeep.svn.sourceforge.net/safekeep/?rev=301&view=rev
Author: dimi
Date: 2007-01-26 08:33:10 -0800 (Fri, 26 Jan 2007)
Log Message:
-----------
Allow only one mode at a time.
Modified Paths:
--------------
safekeep/trunk/safekeep
Modified: safekeep/trunk/safekeep
===================================================================
--- safekeep/trunk/safekeep 2007-01-26 16:32:02 UTC (rev 300)
+++ safekeep/trunk/safekeep 2007-01-26 16:33:10 UTC (rev 301)
@@ -796,10 +796,13 @@
elif o in ('-m', '--smtp'):
smtp = a
elif o in ('--server', ):
+ if mode: usage(2)
mode = 'server'
elif o in ('--client', ):
+ if mode: usage(2)
mode = 'client'
elif o in ('--keys', ):
+ if mode: usage(2)
mode = 'keys'
elif o in ('--status', ):
keys_status = True
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <di...@us...> - 2007-01-26 16:32:15
|
Revision: 300
http://safekeep.svn.sourceforge.net/safekeep/?rev=300&view=rev
Author: dimi
Date: 2007-01-26 08:32:02 -0800 (Fri, 26 Jan 2007)
Log Message:
-----------
Teach usage() to exit if need be, simplify the code a bit.
Modified Paths:
--------------
safekeep/trunk/safekeep
Modified: safekeep/trunk/safekeep
===================================================================
--- safekeep/trunk/safekeep 2007-01-26 16:26:12 UTC (rev 299)
+++ safekeep/trunk/safekeep 2007-01-26 16:32:02 UTC (rev 300)
@@ -740,7 +740,7 @@
# Main routine
######################################################################
-def usage():
+def usage(exitcode=None):
print 'usage: %s [--server] [common options] [server options]' % (sys.argv[0])
print ' %s --client [common options]' % (sys.argv[0])
print ' %s --keys [common options] [keys options] [clientid1 [clientid2] ...]' % (sys.argv[0])
@@ -765,6 +765,7 @@
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)'
+ if exitcode is not None: sys.exit(exitcode)
def main():
try:
@@ -774,8 +775,8 @@
'quiet', 'server', 'smtp=', 'status',
'verbose', 'version'])
except getopt.GetoptError:
- usage()
- sys.exit(2)
+ usage(2)
+
mode = 'server'
email = []
smtp = ''
@@ -791,8 +792,7 @@
elif o in ('-e', '--email'):
email.append(a)
elif o in ('-h', '--help'):
- usage()
- sys.exit()
+ usage(0)
elif o in ('-m', '--smtp'):
smtp = a
elif o in ('--server', ):
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <di...@us...> - 2007-01-26 16:26:21
|
Revision: 299
http://safekeep.svn.sourceforge.net/safekeep/?rev=299&view=rev
Author: dimi
Date: 2007-01-26 08:26:12 -0800 (Fri, 26 Jan 2007)
Log Message:
-----------
Be a little more careful when accessing environment variables, provide fallbacks in case they are not defined
Modified Paths:
--------------
safekeep/trunk/safekeep
Modified: safekeep/trunk/safekeep
===================================================================
--- safekeep/trunk/safekeep 2007-01-26 11:04:57 UTC (rev 298)
+++ safekeep/trunk/safekeep 2007-01-26 16:26:12 UTC (rev 299)
@@ -100,6 +100,11 @@
if path.startswith('/'): return root + path
return os.path.join(root, path)
+def getenv(var, defval=None):
+ val = os.environ.get(var)
+ if val is None: return defval
+ return val
+
######################################################################
# Configuration file parser
######################################################################
@@ -163,10 +168,11 @@
host = user = key_ctrl = key_data = None
if host and not user:
user = 'root'
+ home = getenv('HOME', '/root')
if host and not key_ctrl:
- key_ctrl = os.path.join(os.environ['HOME'], '.ssh', 'safekeep-server-ctrl-key')
+ key_ctrl = os.path.join(home, '.ssh', 'safekeep-server-ctrl-key')
if host and not key_data:
- key_data = os.path.join(os.environ['HOME'], '.ssh', 'safekeep-server-data-key')
+ key_data = os.path.join(home, '.ssh', 'safekeep-server-data-key')
repo_el = backup_el.getElementsByTagName('repo')
dir = None
@@ -619,7 +625,7 @@
if deploy:
info('%s: Key do not exist, generating it now: %s' % (id, privatekeyfile))
gencmd = 'ssh-keygen -q -b 1024 -t dsa -N "" -C "SafeKeep auto generated key at %s@%s" -f %s' % \
- (os.environ['LOGNAME'], os.uname()[1], privatekeyfile)
+ (getenv('LOGNAME', 'root'), os.uname()[1], privatekeyfile)
debug(gencmd)
if os.system(gencmd):
error('%s: Failed to generate key %s. Skipping client.' % (id, privatekeyfile))
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|