Changeset 41059 for branches/ipp-350_add_to_jira_conf_backups/backup.py
- Timestamp:
- Nov 5, 2019, 9:17:31 AM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/ipp-350_add_to_jira_conf_backups/backup.py
r40973 r41059 83 83 84 84 self.read_config_and_schema(config, schema) 85 # self.read_copy_config_section(config, schema)86 # self.read_tar_config_section(config, schema)87 # self.read_rsync_config_section(config, schema)88 # self.read_mysqldump_config_section(config, schema)89 85 90 86 def read_config_and_schema(self, config: ConfigParser, schema: ConfigSchema): … … 206 202 self.target_backup_paths_ok(raise_error=True) 207 203 backup_paths = self.default_dict['backup_paths'] 208 for bp in backup_paths: 209 # if not path.exists(bp): 210 # raise errs.ValidationError(f"ValidationError: target path does not exist: {bp}") 211 212 for s in self.rsync_dict['sources']: 213 if not path.exists(s): 204 205 sources = self.rsync_dict['sources'] 206 for i in range(0, len(sources)): 207 s = sources[i] 208 if not path.exists(s): 214 209 raise errs.ValidationError(f"ValidationError: target path does not exist: {s}") 210 211 for bp in backup_paths: 215 212 try: 216 213 args = [s, bp] 214 217 215 if 'additional_args' in self.rsync_dict.keys(): 218 216 args = args + self.rsync_dict['additional_args'] 219 217 sub_utils.local_rsync_wrapper(args) 218 220 219 except errs.SubprocessError as e: 221 220 raise errs.SubprocessError( f"Error: rsync\n"
Note:
See TracChangeset
for help on using the changeset viewer.
