diff --git a/backup-podman-volumes.py b/backup-podman-volumes.py index 787118a..e0eb012 100644 --- a/backup-podman-volumes.py +++ b/backup-podman-volumes.py @@ -18,7 +18,10 @@ import pydantic import boto3 logger = logging.getLogger(__file__) -logging.basicConfig(level=logging.INFO) +logging.basicConfig( + filename="/var/log/backup-volumes.log", encoding="utf-8", level=logging.INFO +) + class Config(pydantic.BaseModel): # List of volumes to back up. @@ -62,6 +65,7 @@ if __name__ == "__main__": config_path = sys.argv[1] if not pathlib.Path(config_path).exists(): + logger.error("Did not find configuration file at %s.", config_path) raise RuntimeError(f"Did not find configuration at {config_path}") config = Config.parse_file(config_path)