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
0f2eacfa
Commit
0f2eacfa
authored
1 year ago
by
Hahn Axel (hahn)
Browse files
Options
Downloads
Patches
Plain Diff
fix list databases (path with dots cut the name)
parent
9f0f9d4d
Branches
Branches containing commit
No related tags found
1 merge request
!134
fix list databases (path with dots cut the name)
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
localdump.sh
+10
-6
10 additions, 6 deletions
localdump.sh
with
10 additions
and
6 deletions
localdump.sh
+
10
−
6
View file @
0f2eacfa
...
...
@@ -201,16 +201,20 @@
# global string BACKUP_BASEDIR base directory of all backups of selected dbprofile
# param string optional: DB-Name for file filter to select from existing dumps;
function
listBackupedDBs
(){
local
_filter
=
"
$1
"
if
[
-d
"
${
BACKUP_TARGETDIR
}
"
]
;
then
if
[
-z
$1
]
;
then
if
[
-z
"
$_filter
"
]
;
then
# list all databases
find
"
${
BACKUP_TARGETDIR
}
"
-mindepth
1
-maxdepth
1
-type
f
-exec
basename
{}
\;
\
|
sed
"s#__[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]-[0-9][0-9].*##g"
\
|
sed
"s#
\.
.*##g"
\
|
sort
-ud
|
sed
"s#^
\.
/##g"
|
sed
-e
"s#__[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]-[0-9][0-9].*##g"
\
-e
"s#
\.
couchdb
\.
*##g"
\
-e
"s#
\.
gz.meta
\$
##g"
\
-e
"s#
\.
gz
\$
##g"
\
|
sort
-ud
\
|
sed
"s#^
\.
/##g"
else
# list dumps of a database
ls
-ltr
${
BACKUP_TARGETDIR
}
/
${
1
}*
gz |
sed
"s,
${
BACKUP_TARGETDIR
}
/,,g"
ls
-ltr
${
BACKUP_TARGETDIR
}
/
${
_filter
}*
gz |
sed
"s,
${
BACKUP_TARGETDIR
}
/,,g"
fi
else
color.echo error
"ERROR:
${
BACKUP_TARGETDIR
}
does not exist - here are no backups to restore."
...
...
@@ -271,7 +275,7 @@
;;
1
)
echo
"INFO: No interaction on a single choice. Using"
echo
"
$_selection
"
color.echo
"cmd"
"
$_selection
"
LASTINPUT
=
"
$_selection
"
return
0
;;
...
...
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