add info operations
This commit is contained in:
parent
39f519a67e
commit
7bd6f369e7
6
.vscode/numbered-bookmarks.json
vendored
6
.vscode/numbered-bookmarks.json
vendored
@ -4,15 +4,15 @@
|
|||||||
"fsPath": "$ROOTPATH$/borghelper.sh",
|
"fsPath": "$ROOTPATH$/borghelper.sh",
|
||||||
"bookmarks": [
|
"bookmarks": [
|
||||||
-1,
|
-1,
|
||||||
243,
|
257,
|
||||||
|
151,
|
||||||
-1,
|
-1,
|
||||||
-1,
|
-1,
|
||||||
-1,
|
-1,
|
||||||
-1,
|
-1,
|
||||||
-1,
|
-1,
|
||||||
-1,
|
-1,
|
||||||
-1,
|
84
|
||||||
61
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
@ -82,6 +82,10 @@ while [ $# -gt 0 ]; do
|
|||||||
printf "\nStill working on the help text :-)\n\n"
|
printf "\nStill working on the help text :-)\n\n"
|
||||||
exit 0
|
exit 0
|
||||||
;;
|
;;
|
||||||
|
-i|--info)
|
||||||
|
# show archive information
|
||||||
|
operation='info'
|
||||||
|
;;
|
||||||
-l|--list)
|
-l|--list)
|
||||||
# list contents of specific backup
|
# list contents of specific backup
|
||||||
operation='viewarchive'
|
operation='viewarchive'
|
||||||
@ -145,6 +149,11 @@ if [ -z "$varsFile" ]; then
|
|||||||
consoleError 1 'You must provide a valid .borgvars file with information about your borg repo.'
|
consoleError 1 'You must provide a valid .borgvars file with information about your borg repo.'
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# info without archive
|
||||||
|
if [ "$operation" = 'info' ] && [ -z "$archiveName" ]; then
|
||||||
|
consoleError 1 "Info operation requested but no archive name provided. Please use '--list-all' for a list of all available archives."
|
||||||
|
fi
|
||||||
|
|
||||||
# list without archive
|
# list without archive
|
||||||
if [ "$operation" = 'viewarchive' ] && [ -z "$archiveName" ]; then
|
if [ "$operation" = 'viewarchive' ] && [ -z "$archiveName" ]; then
|
||||||
consoleError 1 "List operation requested but no archive name provided. Please use '--list-all' for a list of all available archives."
|
consoleError 1 "List operation requested but no archive name provided. Please use '--list-all' for a list of all available archives."
|
||||||
@ -234,6 +243,11 @@ export TMPDIR="${borgBaseDir}/tmp"
|
|||||||
|
|
||||||
### execute borg operations
|
### execute borg operations
|
||||||
|
|
||||||
|
# info operations
|
||||||
|
if [ "$operation" = 'info' ]; then
|
||||||
|
borg info ::"${archiveName}"
|
||||||
|
fi
|
||||||
|
|
||||||
# list operations
|
# list operations
|
||||||
if [ "$operation" = 'listall' ]; then
|
if [ "$operation" = 'listall' ]; then
|
||||||
borg list
|
borg list
|
||||||
|
Loading…
Reference in New Issue
Block a user