Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
FeldHost Public Projects
OpenNebula 3PAR Backup
Commits
9b1c5864
Commit
9b1c5864
authored
Oct 23, 2019
by
Kristian Feldsam
Browse files
Show borg info on backup end
Signed-off-by:
Kristián Feldsam
<
feldsam@gmail.com
>
parent
07954fcc
Changes
2
Hide whitespace changes
Inline
Side-by-side
backup.py
View file @
9b1c5864
...
...
@@ -136,5 +136,12 @@ for image_key in images:
if
args
.
verbose
:
print
'#============================================================'
# show borgbackup info
if
args
.
verbose
:
try
:
print
functions
.
borgbackup_info
()
except
Exception
as
ex
:
print
ex
# disconnect form 3PAR
_3par
.
logout
()
functions.py
View file @
9b1c5864
import
subprocess
import
config
def
bool_arg
(
string
):
if
string
!=
True
and
string
!=
'1'
and
string
!=
'YES'
:
return
False
...
...
@@ -122,3 +126,10 @@ def filter_images(all_images, datastores, args):
return
images
return
all_images
def
borgbackup_info
():
try
:
return
subprocess
.
check_output
(
'borg info %s'
%
(
config
.
BACKUP_REPO
),
shell
=
True
)
except
subprocess
.
CalledProcessError
as
ex
:
raise
Exception
(
'Can not issue borg info command on repo %s!'
%
(
config
.
BACKUP_REPO
),
ex
)
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment