From 268c7741344ca69a0c4e196d3c32287dde06e24f Mon Sep 17 00:00:00 2001 From: Sol Jerome Date: Sat, 18 Jul 2009 17:23:26 +0000 Subject: 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 git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@5345 ce84e21b-d406-0410-9b95-82705330c041 --- src/lib/Options.py | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/lib/Options.py') 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='', cf=('components', 'encoding')) +PARANOID_PATH = Option('Specify path for paranoid file backups', + default='/var/cache/bcfg2', cf=('paranoid', 'path'), + odesc='') +PARANOID_MAX_COPIES = Option('Specify the number of paranoid copies you want', + default=1, cf=('paranoid', 'max_copies'), + odesc='') + OMIT_LOCK_CHECK = Option('Omit lock check', default=False, cmd='-O') LOGGING_FILE_PATH = Option('Set path of file log', default=None, -- cgit v1.2.3-1-g7c22