adding a backup of the main database in alternc.install
This commit is contained in:
parent
0d6f657e4f
commit
0189f5b095
|
@ -205,6 +205,13 @@ EOF
|
||||||
# hook
|
# hook
|
||||||
run-parts --arg=templates /usr/lib/alternc/install.d
|
run-parts --arg=templates /usr/lib/alternc/install.d
|
||||||
|
|
||||||
|
|
||||||
|
######################################################################
|
||||||
|
# Backup the Main database
|
||||||
|
DB_BACKUP="/var/backups/alternc/${MYSQL_DATABASE}-db-`date +%Y%m%d-%H:%M:%S`.gz"
|
||||||
|
db_dump="mysqldump --defaults-file=/etc/alternc/my.cnf --add-drop-table --allow-keywords --quote-names --force --quick --add-locks --lock-tables --extended-insert ${MYSQL_DATABASE}"
|
||||||
|
$db_dump | /bin/gzip -c > $DB_BACKUP || echo "backup of the main database failed"
|
||||||
|
|
||||||
#######################################################################
|
#######################################################################
|
||||||
# Backup configuration files
|
# Backup configuration files
|
||||||
#
|
#
|
||||||
|
|
Loading…
Reference in New Issue