summaryrefslogtreecommitdiffstats
path: root/src/lib/Options.py
diff options
context:
space:
mode:
authorSol Jerome <solj@ices.utexas.edu>2009-07-18 17:23:26 +0000
committerSol Jerome <solj@ices.utexas.edu>2009-07-18 17:23:26 +0000
commit268c7741344ca69a0c4e196d3c32287dde06e24f (patch)
tree2fa084ecb90d73248d6fb0319abe5d6ca8140308 /src/lib/Options.py
parent0b4840afa99b1b093c8139dc8f7c19b1140e218f (diff)
downloadbcfg2-268c7741344ca69a0c4e196d3c32287dde06e24f.tar.gz
bcfg2-268c7741344ca69a0c4e196d3c32287dde06e24f.tar.bz2
bcfg2-268c7741344ca69a0c4e196d3c32287dde06e24f.zip
Paranoid mode: Make paranoid mode more versatile/configurable
This commit adds a new [paranoid] section in bcfg2.conf. This allows you to specify a backup path other than the default as well as set a maximum number of copies to keep around. You are now allowed multiple backup copies, which are marked with a timestamp. This should help to prevent accidental deletion when running in paranoid mode multiple times. The paranoid section currently looks something like this: [paranoid] path = /my/custom/backup/path max_copies = 5 Signed-off-by: Sol Jerome <solj@ices.utexas.edu> git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@5345 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'src/lib/Options.py')
-rw-r--r--src/lib/Options.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/lib/Options.py b/src/lib/Options.py
index 716c21f09..b61fea808 100644
--- a/src/lib/Options.py
+++ b/src/lib/Options.py
@@ -286,6 +286,13 @@ INTERACTIVE = Option('prompt the user for each change', default=False,
ENCODING = Option('Encoding of cfg files', default=sys.getdefaultencoding(), cmd='-E', odesc='<encoding>',
cf=('components', 'encoding'))
+PARANOID_PATH = Option('Specify path for paranoid file backups',
+ default='/var/cache/bcfg2', cf=('paranoid', 'path'),
+ odesc='<paranoid backup path>')
+PARANOID_MAX_COPIES = Option('Specify the number of paranoid copies you want',
+ default=1, cf=('paranoid', 'max_copies'),
+ odesc='<max paranoid copies>')
+
OMIT_LOCK_CHECK = Option('Omit lock check', default=False, cmd='-O')
LOGGING_FILE_PATH = Option('Set path of file log', default=None,