mirror of
https://github.com/netinvent/npbackup.git
synced 2025-02-24 14:35:36 +08:00
WIP: Implement minimum_backup_size_error
This commit is contained in:
parent
663633b405
commit
35ec3dfa3d
4 changed files with 8 additions and 1 deletions
|
@ -160,6 +160,7 @@ empty_config_dict = {
|
|||
"exclude_files_larger_than": None,
|
||||
"additional_parameters": None,
|
||||
"additional_backup_only_parameters": None,
|
||||
"minimum_backup_size_error": "10M", # TODO
|
||||
"pre_exec_commands": [],
|
||||
"pre_exec_per_command_timeout": 3600,
|
||||
"pre_exec_failure_is_fatal": False,
|
||||
|
@ -167,7 +168,6 @@ empty_config_dict = {
|
|||
"post_exec_per_command_timeout": 3600,
|
||||
"post_exec_failure_is_fatal": False,
|
||||
"post_exec_execute_even_on_backup_error": True,
|
||||
"minimum_backup_size_error": "1M" # TODO
|
||||
}
|
||||
},
|
||||
"repo_opts": {
|
||||
|
|
|
@ -816,6 +816,8 @@ class NPBackupRunner:
|
|||
)
|
||||
use_fs_snapshot = self.repo_config.g("backup_opts.use_fs_snapshot")
|
||||
|
||||
minimum_backup_size_error = self.repo_config.g("backup_opts.minimum_backup_size_error")
|
||||
|
||||
pre_exec_commands = self.repo_config.g("backup_opts.pre_exec_commands")
|
||||
pre_exec_per_command_timeout = self.repo_config.g(
|
||||
"backup_opts.pre_exec_per_command_timeout"
|
||||
|
@ -910,6 +912,9 @@ class NPBackupRunner:
|
|||
additional_backup_only_parameters=additional_backup_only_parameters,
|
||||
)
|
||||
self.write_logs(f"Restic output:\n{result_string}", level="debug")
|
||||
# Extract backup size from result_string
|
||||
|
||||
minimum_backup_size_error = 0
|
||||
metric_writer(
|
||||
self.repo_config, result, result_string, self.restic_runner.dry_run
|
||||
)
|
||||
|
|
|
@ -12,6 +12,7 @@ en:
|
|||
windows_always: always enabled for Windows
|
||||
exclude_cache_dirs: Exclude cache dirs
|
||||
one_file_system: Do not follow mountpoints
|
||||
minimum_backup_size_error: Minimum size under which backup is considered failed
|
||||
pre_exec_commands: Pre-exec commands
|
||||
maximum_exec_time: Maximum exec time
|
||||
exec_failure_is_fatal: Execution failure is fatal
|
||||
|
|
|
@ -12,6 +12,7 @@ fr:
|
|||
windows_always: toujours actif pour Windows
|
||||
exclude_cache_dirs: Exclure dossiers cache
|
||||
one_file_system: Ne pas suivre les points de montage
|
||||
minimum_backup_size_error: Taille minimale en dessous de laquelle la sauvegarde est considérée échouée
|
||||
pre_exec_commands: Commandes pré-sauvegarde
|
||||
maximum_exec_time: Temps maximal d'execution
|
||||
exec_failure_is_fatal: L'échec d'execution est fatal
|
||||
|
|
Loading…
Reference in a new issue