Need a smart DB backup script in bash
I had seen many DB backup scripts which work but don't meet my custom requirements. Later i will add it to cron.
The script should be totally automated in getting home folder path, no hard coded paths need's to be written.
- It will back all available database's in HOME dir inside "BACKUP FOLDER"
- I will run it in cron every day, it should delete LAST 2 old backup's
- saved DB are tar.gz compressed for best compression ratio [obviously name of backed Db file is the datetimestamp]
- should check if lock table, should mail on provided mail id the log of backup success,if error it will log send error in body of mail [no attachment]
Previously i tried to write something from scratch but ended but getting my whole "public_html" folder deleted :oops:
Please get me this cpanel G33k's
Thanks
Note: Need professional work as my database's size various in GBs 280 +
Thanks
-
I'm not sure it will handle a database as large as yours, but I think sourceforge.net/projects/automysqlbackup/ might meet your other requirements. You can set the way it rotates backups in order to determine how many it keeps. 0 -
No my friend,didn't work for me just like other's. Backup at some point is corrupted, i had tried with different settings and max upload buffer etc etc, no success. But if i use simple mysqldump with regular arg's then it work's. So better i use this (simple mysqldump command) in my .sh backup script Is there a way the backup (zip) is sent to dropbox ? [no S3, amazon etc] i had seen few open source, but i need your people advice which works for you always! 0 -
Why not use the script you just posted about (now deleted) in another thread? 0 -
Why not use the script you just posted about (now deleted) in another thread?
It was not working properly for DB having size more than 10 GB's o_O0 -
mysqldump backup is not a perfect solution for large db's with continuous updates. You need to consider Percona XtraBackup percona.com/software/mysql-database/percona-xtrabackup 0 -
Hello :) You may also find the following URL helpful if you are seeking the services of a developer: System Administration Services Thank you. 0 -
Hello :) You may also find the following URL helpful if you are seeking the services of a developer: System Administration Services Thank you.
Thanks. But i need a open source solution for exact same task.0 -
mysqldump backup is not a perfect solution for large db's with continuous updates. You need to consider Percona XtraBackup percona.com/software/mysql-database/percona-xtrabackup
Thanks. Why would mysqldump wont suffice ? Is there any official documentation which mentions limit for 'mysqldump' !0 -
Hello :) MySQL documents this at: MySQL :: MySQL 5.6 Reference Manual :: 4.5.4 mysqldump " A Database Backup Program Thank you. 0
Please sign in to leave a comment.
Comments
9 comments