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
4b295f03
Commit
4b295f03
authored
3 years ago
by
Hahn Axel (hahn)
Browse files
Options
Downloads
Patches
Plain Diff
update prefix __DB__
parent
1eda3641
No related branches found
No related tags found
1 merge request
!50
update prefix __DB__
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
localdump.sh
+2
-2
2 additions, 2 deletions
localdump.sh
plugins/localdump/mysql.sh
+1
-1
1 addition, 1 deletion
plugins/localdump/mysql.sh
plugins/localdump/pgsql.sh
+2
-2
2 additions, 2 deletions
plugins/localdump/pgsql.sh
plugins/localdump/sqlite.sh
+2
-2
2 additions, 2 deletions
plugins/localdump/sqlite.sh
with
7 additions
and
7 deletions
localdump.sh
+
2
−
2
View file @
4b295f03
...
...
@@ -96,11 +96,11 @@
cecho error
"FAILED"
fi
else
cecho error
"ERROR occured while dumping - no gzip"
cecho error
"ERROR occured while dumping - no gzip
of
$_outfile
"
fi
# echo -n "__DB__$SERVICENAME INFO: backup to "
# ls -l "$_outfile"* 2>&1
echo
#
echo
}
# ----------------------------------------------------------------------
...
...
This diff is collapsed.
Click to expand it.
plugins/localdump/mysql.sh
+
1
−
1
View file @
4b295f03
...
...
@@ -158,7 +158,7 @@ function mysql.backup(){
for
_dbname
in
$(
mysql.db.list
)
do
echo
-n
"__DB__
${
SERVICENAME
}
backup
$_dbname
"
echo
-n
"__DB__
${
SERVICENAME
}
backup
$_dbname
...
"
_outfile
=
"
${
BACKUP_TARGETDIR
}
/
$(
get_outfile
${
_dbname
}
)
.sql"
mysql.db.dump
"
$_dbname
"
"
$_outfile
"
...
...
This diff is collapsed.
Click to expand it.
plugins/localdump/pgsql.sh
+
2
−
2
View file @
4b295f03
...
...
@@ -54,10 +54,10 @@ 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
$_dbname
...
"
OUTFILE
=
"
${
BACKUP_TARGETDIR
}
/
$(
get_outfile
${
DATABASE
}
)
.sql"
su
${
PGUSER
}
-c
"pg_dump -Fp
${
DATABASE
}
>
$OUTFILE
"
fetchrc
fetchrc
>
/dev/null
db._compressDumpfile
"
$OUTFILE
"
...
...
This diff is collapsed.
Click to expand it.
plugins/localdump/sqlite.sh
+
2
−
2
View file @
4b295f03
...
...
@@ -53,9 +53,9 @@ function doSqliteBackup(){
TARGET
=
$(
get_outfile
${
DATABASE_FILE
}
)
TARGET
=
${
BACKUP_TARGETDIR
}
/
$(
echo
${
TARGET
}
|
sed
"s#/#_#g"
)
.sql
META
=
${
TARGET
}
.gz.meta
echo
-n
" to
$TARGET
"
#
echo -n " to $TARGET "
sqlite3
"
$DATABASE_FILE
"
.dump
>
"
${
TARGET
}
"
fetchrc
fetchrc
>
/dev/null
db._compressDumpfile
"
${
TARGET
}
"
# $myrc is last returncode - set in fetchrc
...
...
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