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
Merge requests
!134
fix list databases (path with dots cut the name)
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
fix list databases (path with dots cut the name)
7000-corrections
into
master
Overview
0
Commits
1
Pipelines
0
Changes
1
Merged
Hahn Axel (hahn)
requested to merge
7000-corrections
into
master
1 year ago
Overview
0
Commits
1
Pipelines
0
Changes
1
Expand
0
0
Merge request reports
Compare
master
master (base)
and
latest version
latest version
0f2eacfa
1 commit,
1 year ago
1 file
+
10
−
6
Side-by-side
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
localdump.sh
+
10
−
6
Options
@@ -201,16 +201,20 @@
@@ -201,16 +201,20 @@
# global string BACKUP_BASEDIR base directory of all backups of selected dbprofile
# 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;
# param string optional: DB-Name for file filter to select from existing dumps;
function
listBackupedDBs
(){
function
listBackupedDBs
(){
local
_filter
=
"
$1
"
if
[
-d
"
${
BACKUP_TARGETDIR
}
"
]
;
then
if
[
-d
"
${
BACKUP_TARGETDIR
}
"
]
;
then
if
[
-z
$1
]
;
then
if
[
-z
"
$_filter
"
]
;
then
# list all databases
# list all databases
find
"
${
BACKUP_TARGETDIR
}
"
-mindepth
1
-maxdepth
1
-type
f
-exec
basename
{}
\;
\
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
-e
"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"
\
-e
"s#
\.
couchdb
\.
*##g"
\
|
sort
-ud
|
sed
"s#^
\.
/##g"
-e
"s#
\.
gz.meta
\$
##g"
\
-e
"s#
\.
gz
\$
##g"
\
|
sort
-ud
\
|
sed
"s#^
\.
/##g"
else
else
# list dumps of a database
# 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
fi
else
else
color.echo error
"ERROR:
${
BACKUP_TARGETDIR
}
does not exist - here are no backups to restore."
color.echo error
"ERROR:
${
BACKUP_TARGETDIR
}
does not exist - here are no backups to restore."
@@ -271,7 +275,7 @@
@@ -271,7 +275,7 @@
;;
;;
1
)
1
)
echo
"INFO: No interaction on a single choice. Using"
echo
"INFO: No interaction on a single choice. Using"
echo
"
$_selection
"
color.echo
"cmd"
"
$_selection
"
LASTINPUT
=
"
$_selection
"
LASTINPUT
=
"
$_selection
"
return
0
return
0
;;
;;
Loading