diff --git a/npbackup/__main__.py b/npbackup/__main__.py index 365fdc8..8c16f53 100644 --- a/npbackup/__main__.py +++ b/npbackup/__main__.py @@ -203,7 +203,7 @@ This is free software, and you are welcome to redistribute it under certain cond type=str, default=None, required=False, - help="Dump a specific file to stdout", + help="Dump a specific file to stdout, use with --dump [snasphot-id] file, where snapshot-id can be 'latest'", ) parser.add_argument( "--stats", diff --git a/npbackup/restic_metrics/__init__.py b/npbackup/restic_metrics/__init__.py index 1718195..6d5b0b2 100644 --- a/npbackup/restic_metrics/__init__.py +++ b/npbackup/restic_metrics/__init__.py @@ -480,7 +480,7 @@ def upload_metrics(destination: str, authentication, no_cert_verify: bool, metri verify=not no_cert_verify, ) if result.status_code == 200: - logger.info("Metrics pushed succesfully.") + logger.info("Metrics pushed successfully.") else: logger.warning( f"Could not push metrics: {result.status_code}: {result.text}" @@ -577,7 +577,7 @@ if __name__ == "__main__": logger.error("Script finished with errors.") try: write_metrics_file(metrics, destination_file) - logger.info("File {} written succesfully.".format(destination_file)) + logger.info("File {} written successfully.".format(destination_file)) sys.exit(0) except OSError as exc: logger.error( diff --git a/npbackup/restic_wrapper/__init__.py b/npbackup/restic_wrapper/__init__.py index 8bc2e78..affd170 100644 --- a/npbackup/restic_wrapper/__init__.py +++ b/npbackup/restic_wrapper/__init__.py @@ -775,7 +775,7 @@ class ResticRunner: if output: if HAVE_MSGSPEC: try: - js["output"] = msgspec.json.decode(output) + js["output"] = msgspec.json.decode(str(output)) except msgspec.DecodeError as exc: # Save as above @@ -858,7 +858,7 @@ class ResticRunner: cmd = "ls {}".format(snapshot) result, output = self.executor(cmd, method="monitor") if result: - msg = f"Successfuly listed snapshot {snapshot} content" + msg = f"Successfully listed snapshot {snapshot} content:\n{output}" else: msg = f"Could not list snapshot {snapshot} content:\n{output}" return self.convert_to_json_output(result, output, msg=msg, **kwargs) @@ -1230,7 +1230,7 @@ class ResticRunner: cmd = f"recover" result, output = self.executor(cmd) if result: - msg = f"Recovery succees" + msg = f"Recovery finished" else: msg = f"Recovery failed:\n{output}" return self.convert_to_json_output(result, output, msg=msg, **kwargs) @@ -1295,9 +1295,9 @@ class ResticRunner: result, output = self.executor(command) if result: - msg = f"successfully run raw command:\n{output}" + msg = f"Successfully run raw command:\n{output}" else: - msg = "Raw command failed:\n{output}" + msg = f"Raw command failed:\n{output}" return self.convert_to_json_output(result, output, msg=msg, **kwargs) @staticmethod