best way to backup data
Hello everyone,
I was concerned about how to do a full database backup by using mysqldump as a part of a bash script.
Basically the idea is run mysqldump as following:
"mysqldump --no-create-db --add-drop-table --add-locks --allow-keywords --comments --create-options --debug-info --extended-insert --flush-logs --force --log-error=/backups/databases/dump_${DATE}.log --routines --set-charset --dump-date --triggers --tz-utc --single-transaction -u XXXX -pYYYYY -h localhost --databases ${DATABASES} > backup_${DATE}.sql"
After that check if mysqldump has returned an error or not:
if [ "$?" -eq 0 ]; then
echo "Success"
else
echo "error"
//alert admins about this situation, etc
fi
If everything is OK, it will be compressed in a tarball file, then tested by using "tar -tzf <filename>". And if it is ok, the compressed file will be copied to an external server (by using Evault) which checks file integrity.
My question is, is that enough or should I restore the backup to another database and check if it is OK?
Does mysqldump fails if a table is having troubles?
What other things should I be aware of?
Thanks!
Subject
Views
Written By
Posted
best way to backup data
3176
December 11, 2014 01:36PM
1899
December 12, 2014 11:01PM
1696
December 15, 2014 08:59AM
2190
December 17, 2014 11:48AM
1479
December 17, 2014 01:20PM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.