Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
OpenNebula 3PAR Backup
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
FeldHost Public Projects
OpenNebula 3PAR Backup
Commits
9b1c5864
Commit
9b1c5864
authored
Oct 23, 2019
by
Kristian Feldsam
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
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
Showing
2 changed files
with
18 additions
and
0 deletions
+18
-0
backup.py
backup.py
+7
-0
functions.py
functions.py
+11
-0
No files found.
backup.py
View file @
9b1c5864
...
@@ -136,5 +136,12 @@ for image_key in images:
...
@@ -136,5 +136,12 @@ for image_key in images:
if
args
.
verbose
:
if
args
.
verbose
:
print
'#============================================================'
print
'#============================================================'
# show borgbackup info
if
args
.
verbose
:
try
:
print
functions
.
borgbackup_info
()
except
Exception
as
ex
:
print
ex
# disconnect form 3PAR
# disconnect form 3PAR
_3par
.
logout
()
_3par
.
logout
()
functions.py
View file @
9b1c5864
import
subprocess
import
config
def
bool_arg
(
string
):
def
bool_arg
(
string
):
if
string
!=
True
and
string
!=
'1'
and
string
!=
'YES'
:
if
string
!=
True
and
string
!=
'1'
and
string
!=
'YES'
:
return
False
return
False
...
@@ -122,3 +126,10 @@ def filter_images(all_images, datastores, args):
...
@@ -122,3 +126,10 @@ def filter_images(all_images, datastores, args):
return
images
return
images
return
all_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