• About
  • Write For Us
  • Contact
  • Top 50 Photography Blogs
  • Resources
  • Forum

IndustryDev

  • Design
    • Photoshop
    • Lightroom
    • Camera Raw
    • Bridge
  • Development
    • HTML
    • CSS
    • Javascript
    • PHP
    • Dev Tools
    • WordPress
  • Photography
  • Blogging
  • Technology
  • Inspiration
You are here: Home / Technology / How to Set Up a Database Dump Cron Job in cPanel

How to Set Up a Database Dump Cron Job in cPanel

October 9, 2018

This is one I’ve been doing for years with every hosting company I’ve worked with and for some reason, the syntax of the command changes every time. It’s very odd. I have to keep tweaking things to make it work. This command I’ll share with you below works with my latest host. I’m using WHM and cPanel and after visiting the Cron page and filling in the frequency of the database dump, I fill in this code:

mysqldump –user=database_username –password=’database_password’ database_name | gzip > /home/account_username/database_name.sql.gz

Obviously, fill in the “database_username” and similar parts with your own information. As you can see, the zipped dump will be placed in the root directory. Always zip your database dumps because the zipping makes the files so so much smaller and easier to work with. I’m talking like 300 MBs down to 65MBs. It’s crazy.

Related posts:

  1. How to Increase the File Upload Size in cPanel
  2. How to Copy & Paste to the Command Prompt in Windows 10
  3. Wordfence Firewall Causing 403 Forbidden Page Load Error

Filed Under: Technology

What’s Next? Email Updates!

If you enjoyed reading this post, why not consider signing up to receive others like it by email? It's so easy and you can unsubscribe at any time.

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Connect With Me

  • Facebook
  • Instagram
  • Pinterest
  • RSS
  • Twitter

Copyright © 2021 · IndustryDev.com Web Design & Photography Blog · About · Write For Us · Contact · Privacy / Terms · Sitemap