Compare commits

..

No commits in common. "37bd4e69c6d65953d879468d9c38c78765072f96" and "d29dec95e210db5e4b870a3311d0088e834f1a3f" have entirely different histories.

1 changed files with 5 additions and 9 deletions

View File

@ -55,7 +55,7 @@ scriptHelp() {
ptextblock "-i|--info"
textblock "Get information about a specified borg repo archive. Requires you supply '--archive'."
ptextblock "-l|--list"
textblock "List contents of a specified borg repo archive. Requires you supply '--archive'. You can optionally specify a file/pattern to search for using '--file'."
textblock "List contents of a specified borg repo archive. Requires you supply '--archive'."
ptextblock "-la|--list-all"
textblock "List all available archives within the repo specified in your .borgvars file."
ptextblock "-r|--restore"
@ -68,7 +68,7 @@ scriptHelp() {
ptextblock "--exclude"
textblock "Pattern (python/borg) of files to exclude from a restore operation."
ptextblock "-f|--file"
textblock "Specific file/pattern (python/borg) within an archive for which you want to restore or search. Requires that you supply '--archive'."
textblock "Specific file/pattern (python/borg) you want to restore from an archive. Requires that you supply '--archive'."
ptextblock "-p|--path"
textblock "Path to which you want your archive/files restored. This script will attempt to create the directory for you if it does not already exist."
printf "\n"
@ -152,9 +152,9 @@ while [ $# -gt 0 ]; do
shift
;;
-f|--file)
# specific file/pattern to restore
# specific file to restore
if [ -z "$2" ]; then
consoleError 1 'Please provide the name of the specific file/pattern for which you want to restore or search.'
consoleError 1 'Please provide the name of the specific file you want to restore.'
fi
fileName="$2"
shift
@ -361,11 +361,7 @@ if [ "$operation" = 'info' ]; then
elif [ "$operation" = 'listall' ]; then
borg list
elif [ "$operation" = 'viewarchive' ]; then
if [ "$fileName" ]; then
borg list ::"${archiveName}" "${fileName}"
else
borg list ::"${archiveName}"
fi
borg list ::"${archiveName}"
# restore operations
elif [ "$operation" = 'restore' ]; then
cd "$restorePath" || consoleError 4 'Could not change to restore directory.'