|
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.
|