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
No related branches found
No related tags found
1 merge request!50update prefix __DB__
......@@ -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
}
# ----------------------------------------------------------------------
......
......@@ -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"
......
......@@ -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"
......
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment