Sample Header Ad - 728x90

How to avoid server crash during backup of dabase using a crontab

1 vote
3 answers
255 views
I'm on shared hosting, so I want to avoid using too much system resources. I have a crontab that schedules a MySQL database backup. The database is about 2gb before compression. When that crontab runs, the system seems to crash, because the http server stops for a minute or 2. Is there anything that I can add or edit to my command that would run the db backup job gradually or in smaller steps to avoid server crashes? Here is the command that causes the problem: mysqldump --add-drop-table --user=xxxxxxxxx --password='xxxxxxxxxxxx' db_name | gzip >/path/to/my/backup_directory/db_backup.dmp.gz Any tips please? or should I ask my host to change any settings in my account?
Asked by Muhammad (11 rep)
Oct 26, 2016, 10:32 AM
Last activity: Aug 2, 2019, 08:02 PM