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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
IML Open Source
iml-backup
Merge requests
!53
pgsql backup: show database name
Code
Review changes
Check out branch
Download
Patches
Plain diff
Expand sidebar
Merged
pgsql backup: show database name
update-localdump-to-classlike-functions
into
master
Overview
0
Commits
1
Pipelines
0
Changes
1
Merged
Hahn Axel (hahn)
requested to merge
update-localdump-to-classlike-functions
into
master
3 years ago
Overview
0
Commits
1
Pipelines
0
Changes
1
0
0
Merge request reports
Compare
master
master (base)
and
latest version
latest version
b58c8778
1 commit,
3 years ago
1 file
+
1
−
1
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
plugins/localdump/pgsql.sh
+
1
−
1
View file @ b58c8778
Edit in single-file editor
Open in Web IDE
Show full file
@@ -54,7 +54,7 @@ function doPgsqlBackup(){
sSqlGetDblist
=
"select datname from pg_database where not datistemplate and datallowconn order by datname;"
for
DATABASE
in
$(
su
${
PGUSER
}
-c
"psql -At -c '
$sSqlGetDblist
' postgres"
2>/dev/null
)
do
echo
-n
"__DB__
${
SERVICENAME
}
backup
$
_dbname
... "
echo
-n
"__DB__
${
SERVICENAME
}
backup
$
DATABASE
... "
OUTFILE
=
"
${
BACKUP_TARGETDIR
}
/
$(
get_outfile
${
DATABASE
}
)
.sql"
su
${
PGUSER
}
-c
"pg_dump -Fp
${
DATABASE
}
>
$OUTFILE
"
fetchrc
>
/dev/null
Loading