Running a Cron job every 5 minutes to back up WordPress site to Github

burnedfaceless used Ask the Experts™
I am going to put one of my servers at a datacenter and start hosting client's sites. I'm going to monitor the sites using pingdom, and I wanted to provide regular backups.

I wrote a shell script that backs up the database then pushes the repositiory to a private GitHub repo every 5 minutes.

Is running a Cron job every 5 minutes going to have an impact on my server's resources and load times?
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Web Developer/Designer
"Is running a Cron job every 5 minutes going to have an impact on my server's resources and load times?"

Yes, but without knowing more about the server and workload it's hard to tell how much of one. You can use performance monitoring tools in order to alert you if resources get low. I don't have enough experience with these to recommend a particular one. I have used NewRelic in the past but it's a bit pricey. You could also do performance testing with tools like jmeter while a backup is running in order to determine how much load your servers could take while running a backup.

Alternately you can use Wordpress backup plugins and services which specialize in this sort of thing, but I imagine you wanted to sidestep the price of that. They still use resources but they also specialize in this kind of stuff.

Personally I would schedule backups less frequently and when the server load is low, perhaps at 2AM on your local time. That way your natural website traffic won't be negatively impacted.


nociSoftware Engineer
Distinguished Expert 2018

As most of the stuff is in a database look for a database that can support on-line backups.
(possibly with taking a snapshot. LVM snapshot can help here if needed).

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial