qvm-tools/qvm-backup: add --debug option
This commit is contained in:
parent
0cd8281ac1
commit
96d5b47cce
@ -26,6 +26,7 @@ from qubes.qubes import QubesException
|
|||||||
from qubes.backup import backup_prepare, backup_do
|
from qubes.backup import backup_prepare, backup_do
|
||||||
from qubes.qubesutils import size_to_human
|
from qubes.qubesutils import size_to_human
|
||||||
from optparse import OptionParser
|
from optparse import OptionParser
|
||||||
|
import qubes.backup
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
import getpass
|
import getpass
|
||||||
@ -62,6 +63,8 @@ def main():
|
|||||||
"list-message-digest-algorithms'")
|
"list-message-digest-algorithms'")
|
||||||
parser.add_option ("-z", "--compress", action="store_true", dest="compress", default=False,
|
parser.add_option ("-z", "--compress", action="store_true", dest="compress", default=False,
|
||||||
help="Compress the backup")
|
help="Compress the backup")
|
||||||
|
parser.add_option ("--debug", action="store_true", dest="debug",
|
||||||
|
default=False, help="Enable (a lot of) debug output")
|
||||||
|
|
||||||
(options, args) = parser.parse_args ()
|
(options, args) = parser.parse_args ()
|
||||||
|
|
||||||
@ -95,6 +98,8 @@ def main():
|
|||||||
options.encrypt = True
|
options.encrypt = True
|
||||||
if options.no_encrypt:
|
if options.no_encrypt:
|
||||||
options.encrypt = False
|
options.encrypt = False
|
||||||
|
if options.debug:
|
||||||
|
qubes.backup.BACKUP_DEBUG = True
|
||||||
files_to_backup = None
|
files_to_backup = None
|
||||||
try:
|
try:
|
||||||
files_to_backup = backup_prepare(
|
files_to_backup = backup_prepare(
|
||||||
|
Loading…
Reference in New Issue
Block a user