Tips To Take Database Backup Using Cron Job

1 replies
  • WEB DESIGN
  • |
Database Backup using Cron Job: For backing up of the WordPress database, you will find lots of plugins all over that may complete the work. A number of them backup only the database while some backup the entire WordPress directory. For those who have used WordPress lengthy enough, you'll understand that these plug ins aren't trustworthy. They are effective eventually and fail a later date, for 1000 and 1 reasons. Maybe they aren't suitable for the brand new WordPress version you have upgraded to, or that they're conflicting having a recently triggered WordPress plugin. As with my situation, it might also because the database gets too large to allow them to handle...

Read the full article here: explorefeed dot com/database-backup-using-cron-job

(replace dot with .)
#backup #cron #database #job #tips
  • Profile picture of the author Piyush1
    Hi all,

    Really nice and important information, i am adding some more content in that:
    Setting up a cron for nightly backup:
    The first thing you need to do is to ensure that your host supports Cron Jobs. Most popular hosts like HostGator, BlueHost, DreamHost,etc do support it. If you don't have a host that supports Cron Jobs, then you may consider purchasing 3 Years Unlimited Hosting for just 0.99$ from Hostable.

    • Download this file (cronjob.sh).
    • Open it with Notepad++ or whichever editing tool you prefer.
    • Find DBNAME, DBPASS, DBUSER & EMAIL. Replace their values with your Database Name, User ID, password and the email where you want the Database Backup to be mailed to.
    • Now upload this file to the 'etc' folder in your directory. This is to prevent visitors from accessing your file.
    • After you finish the upload, just change the File Permissions to 711.
    • Now, click on the Cron Jobs icon (normally located in the Advanced section).
    • Ensure that the email address in the Email field points to your own ID.
    • In the Add New Cron Job section, click on the Common Settings dropdown & select Once a Day. This will automatically fill the rest of the fields (See the Above image for ref.)
    • In the Command Input field, enter the path where you've uploaded the cronjob.sh file.
    • Finally, click on the 'Add New Cron Job' button.
    {{ DiscussionBoard.errors[4376951].message }}

Trending Topics