Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
iml-backup
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
IML Open Source
iml-backup
Commits
41454ff9
Commit
41454ff9
authored
2 years ago
by
Hahn Axel (hahn)
Browse files
Options
Downloads
Patches
Plain Diff
init vars of backup tool
parent
7b6c69f8
Branches
Branches containing commit
No related tags found
1 merge request
!86
init vars of backup tool
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
restore.sh
+22
-13
22 additions, 13 deletions
restore.sh
with
22 additions
and
13 deletions
restore.sh
+
22
−
13
View file @
41454ff9
...
@@ -22,6 +22,7 @@
...
@@ -22,6 +22,7 @@
# 2018-08-27 ah,ds v1.2 fix restore target with a given selection; handle '*' placeholder
# 2018-08-27 ah,ds v1.2 fix restore target with a given selection; handle '*' placeholder
# 2019-06-05 ah,ds v1.3 add custom cache dir
# 2019-06-05 ah,ds v1.3 add custom cache dir
# 2021-05-19 ah,ds, v2.0 plugin driven
# 2021-05-19 ah,ds, v2.0 plugin driven
# 2022-10-21 ah v2.1 init vars
# ================================================================================
# ================================================================================
...
@@ -225,6 +226,9 @@ function doRestore(){
...
@@ -225,6 +226,9 @@ function doRestore(){
enterBackupDir
enterBackupDir
fi
fi
# init vars of the backup tool
t_getParamDefault
>
/dev/null
# ----- menu and loop
# ----- menu and loop
...
@@ -246,22 +250,26 @@ function doRestore(){
...
@@ -246,22 +250,26 @@ function doRestore(){
# echo " C - show file changes"
# echo " C - show file changes"
# echo " S - search file"
# echo " S - search file"
# echo " V - verify"
# echo " V - verify"
# echo " B - Bash (Shell)"
# echo
# echo
echo
" R - start restore with
$STORAGE_BIN
"
echo
" R - start restore with
$STORAGE_BIN
"
echo
echo
echo
" restore from :
$STORAGE_TARGETPATH
"
echo
" restore from :
$STORAGE_TARGETPATH
"
echo
" restore to :
$RESTORE_TARGETPATH
"
echo
" restore to :
$RESTORE_TARGETPATH
"
echo
-n
" "
echo
-n
" "
ls
-d
$RESTORE_TARGETPATH
>
/dev/null 2>&1
if
[
-n
"
$RESTORE_TARGETPATH
"
]
;
then
if
[
$?
-eq
0
]
;
then
ls
-d
$RESTORE_TARGETPATH
>
/dev/null 2>&1
color error
if
[
$?
-eq
0
]
;
then
echo
"WARNING: directory already exists! Backup will fail."
color error
color reset
echo
"WARNING: directory already exists! Backup will fail."
color reset
else
echo
"OK, it does not exist yet"
fi
else
else
echo
"
OK, it does not exist y
et"
echo
"
(not s
et
)
"
fi
fi
echo
echo
echo
" B - Bash (Shell)"
echo
" X - exit"
echo
" X - exit"
echo
echo
...
@@ -291,14 +299,15 @@ function doRestore(){
...
@@ -291,14 +299,15 @@ function doRestore(){
read
filefilter
read
filefilter
test
-z
"
${
filefilter
}
"
||
t_restoreDoSearchFile
"
${
filefilter
}
"
test
-z
"
${
filefilter
}
"
||
t_restoreDoSearchFile
"
${
filefilter
}
"
;;
;;
v|V
)
#
v|V)
v
erify
#
t_backupDoV
erify
;;
#
;;
b|B
)
b|B
)
h2
"Shell"
h2
"Shell"
echo type exit
to
return
...
echo
"HINT: type exit in the subshell to return to the menu."
export
PS1
=
"[
`
basename
$0
`
\u
@
\h
\w
]
\$
"
echo
bash
export
PS1
=
"RESTIC [
`
basename
$0
`
\u
@
\h
\w
]
\$
"
bash
--noprofile
;;
;;
f|F
)
f|F
)
h2
"Filter restore items"
h2
"Filter restore items"
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment