- Timestamp:
- Oct 22, 2019, 2:30:49 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/ipp-259_genericise_backups/tools/backups/mailman_backup.py
r40958 r40962 1 import argparse2 1 import os.path as path 3 2 4 import backups.utils.config_parse_helper as cfg_help5 from backup s.backupimport Backup6 from backups.utils.config_parse_helper import ConfigSchema, ConfigSchemaSection, ConfigSchemaLine3 import utils.config_parse_helper as cfg_help 4 from backup import Backup 5 from utils.config_parse_helper import ConfigSchema, ConfigSchemaSection, ConfigSchemaLine 7 6 8 7 EXPECTED_CONFIG_FILE = path.join(path.dirname(__file__), './mailman_backup.config') … … 32 31 33 32 34 def main(): 35 mb = MailmanBackup() 36 mb.run_backup() 37 38 39 def parse_args(args): 40 41 parser = argparse.ArgumentParser( 42 description='Performs backup of mailman.') 43 44 parser.add_argument('--config_file', 45 nargs='?', 46 help='specify the location of a config that matches the ConfigSchema', 47 default=EXPECTED_CONFIG_FILE) 48 49 return parser.parse_args() 33 def main(config=EXPECTED_CONFIG_FILE, schema=MAILMAN_SCHEMA): 34 mb = MailmanBackup(config, schema) 35 mb.run_backup_processes() 50 36 51 37
Note:
See TracChangeset
for help on using the changeset viewer.
