Added recovery flag
parent
33d8c301e8
commit
159d3de72b
|
@ -7,6 +7,7 @@ from parser import read_specs_file
|
||||||
parser = argparse.ArgumentParser(
|
parser = argparse.ArgumentParser(
|
||||||
description="Backup directories and Docker volumes."
|
description="Backup directories and Docker volumes."
|
||||||
)
|
)
|
||||||
|
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
"-f",
|
"-f",
|
||||||
"--file",
|
"--file",
|
||||||
|
@ -15,6 +16,7 @@ parser.add_argument(
|
||||||
required=True,
|
required=True,
|
||||||
help="File containing spec definitions.",
|
help="File containing spec definitions.",
|
||||||
)
|
)
|
||||||
|
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
"-j",
|
"-j",
|
||||||
"--json",
|
"--json",
|
||||||
|
@ -23,6 +25,17 @@ parser.add_argument(
|
||||||
default=False,
|
default=False,
|
||||||
help="Print out the parsed specs as JSON and exit",
|
help="Print out the parsed specs as JSON and exit",
|
||||||
)
|
)
|
||||||
|
|
||||||
|
parser.add_argument(
|
||||||
|
"-r",
|
||||||
|
"--recover",
|
||||||
|
action="append",
|
||||||
|
nargs=2,
|
||||||
|
metavar=("SPEC", "BACKUP"),
|
||||||
|
dest="recovers",
|
||||||
|
help="Recover the given spec; requires two arguments",
|
||||||
|
)
|
||||||
|
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
"spec", nargs="*", help="The specs to process. Defaults to all."
|
"spec", nargs="*", help="The specs to process. Defaults to all."
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in New Issue