Skip to content
Snippets Groups Projects
Commit 4b295f03 authored by Hahn Axel (hahn)'s avatar Hahn Axel (hahn)
Browse files

update prefix __DB__

parent 1eda3641
Branches
No related tags found
1 merge request!50update prefix __DB__
...@@ -96,11 +96,11 @@ ...@@ -96,11 +96,11 @@
cecho error "FAILED" cecho error "FAILED"
fi fi
else else
cecho error "ERROR occured while dumping - no gzip" cecho error "ERROR occured while dumping - no gzip of $_outfile"
fi fi
# echo -n "__DB__$SERVICENAME INFO: backup to " # echo -n "__DB__$SERVICENAME INFO: backup to "
# ls -l "$_outfile"* 2>&1 # ls -l "$_outfile"* 2>&1
echo # echo
} }
# ---------------------------------------------------------------------- # ----------------------------------------------------------------------
......
...@@ -158,7 +158,7 @@ function mysql.backup(){ ...@@ -158,7 +158,7 @@ function mysql.backup(){
for _dbname in $( mysql.db.list ) for _dbname in $( mysql.db.list )
do do
echo -n "__DB__${SERVICENAME} backup $_dbname " echo -n "__DB__${SERVICENAME} backup $_dbname ... "
_outfile="${BACKUP_TARGETDIR}/$(get_outfile ${_dbname}).sql" _outfile="${BACKUP_TARGETDIR}/$(get_outfile ${_dbname}).sql"
mysql.db.dump "$_dbname" "$_outfile" mysql.db.dump "$_dbname" "$_outfile"
......
...@@ -54,10 +54,10 @@ function doPgsqlBackup(){ ...@@ -54,10 +54,10 @@ function doPgsqlBackup(){
sSqlGetDblist="select datname from pg_database where not datistemplate and datallowconn order by datname;" 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) for DATABASE in $(su ${PGUSER} -c "psql -At -c '$sSqlGetDblist' postgres" 2>/dev/null)
do do
echo -n "__DB__${SERVICENAME} backup $_dbname " echo -n "__DB__${SERVICENAME} backup $_dbname ... "
OUTFILE="${BACKUP_TARGETDIR}/$(get_outfile ${DATABASE}).sql" OUTFILE="${BACKUP_TARGETDIR}/$(get_outfile ${DATABASE}).sql"
su ${PGUSER} -c "pg_dump -Fp ${DATABASE} >$OUTFILE" su ${PGUSER} -c "pg_dump -Fp ${DATABASE} >$OUTFILE"
fetchrc fetchrc >/dev/null
db._compressDumpfile "$OUTFILE" db._compressDumpfile "$OUTFILE"
......
...@@ -53,9 +53,9 @@ function doSqliteBackup(){ ...@@ -53,9 +53,9 @@ function doSqliteBackup(){
TARGET=$(get_outfile ${DATABASE_FILE}) TARGET=$(get_outfile ${DATABASE_FILE})
TARGET=${BACKUP_TARGETDIR}/$(echo ${TARGET} | sed "s#/#_#g").sql TARGET=${BACKUP_TARGETDIR}/$(echo ${TARGET} | sed "s#/#_#g").sql
META=${TARGET}.gz.meta META=${TARGET}.gz.meta
echo -n " to $TARGET " # echo -n " to $TARGET "
sqlite3 "$DATABASE_FILE" .dump >"${TARGET}" sqlite3 "$DATABASE_FILE" .dump >"${TARGET}"
fetchrc fetchrc >/dev/null
db._compressDumpfile "${TARGET}" db._compressDumpfile "${TARGET}"
# $myrc is last returncode - set in fetchrc # $myrc is last returncode - set in fetchrc
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment