Browse Source

Add arg to specify borg program

master
Jim Paris 8 months ago
parent
commit
863b7acc9b
1 changed files with 4 additions and 2 deletions
  1. +4
    -2
      backup.py

+ 4
- 2
backup.py View File

@@ -191,9 +191,11 @@ def main(argv: list[str]):
description="Back up the local system using borg",
formatter_class=argparse.ArgumentDefaultsHelpFormatter)

default_config = str(pathlib.Path(__file__).parent / "config.yaml")
base = pathlib.Path(__file__).parent
parser.add_argument('-c', '--config',
help="Config file", default=default_config)
help="Config file", default=str(base / "config.yaml"))
parser.add_argument('-b', '--borg',
help="Borg command", default=str(base / "borg.sh"))
parser.add_argument('-n', '--dry-run', action="store_true",
help="Just print filenames, don't run borg")



Loading…
Cancel
Save