Security & SSL

How to Set Up Automatic Backups in cPanel Step by Step

Learn how to set up automatic backups in cPanel to protect your website and database without relying solely on your hosting provider's copies.

Close-up of a rusty padlock on a weathered wall, showcasing vintage charm.

To set up an automatic backup in cPanel, go to Backup → Backup Wizard, choose a frequency (daily, weekly, or monthly), and select a remote destination such as FTP or Amazon S3. With the right plan, everything is automated from there.

In practice, though, it's more nuanced: not every hosting plan enables the same tools, and relying solely on your provider's backups is a risk many site owners only discover too late. This guide walks through every available option and when to use each one.

Why You Need Your Own Backups (Not Just the Host's)

Most hosting plans include some form of backup, but there are three common traps:

  • Too infrequent: many plans only keep a weekly snapshot. If your site is hacked on Thursday, you lose six days of work.
  • Short retention: some providers only keep the most recent backup. If a hack or corruption went unnoticed, the clean copy is already gone.
  • Same server: if the server suffers a hardware failure or ransomware attack, your files and the "backup" disappear together.

The 3-2-1 backup rule says: 3 copies, on 2 different media, 1 offsite. cPanel gives you the tools to follow it.

The Three Backup Tools in cPanel

Depending on your cPanel version and hosting plan, you'll find one or more of these options under the Files section:

Tool What it does Automatable
Backup Manual download of full account or individual files and databases No
Backup Wizard Step-by-step guide for manual backup or restore No
JetBackup / R1Soft Scheduled automatic backups with remote destinations; available on higher-tier plans Yes

If your plan doesn't include a scheduling tool, the next section covers how to fill that gap with a cron job and a shell script.

Step by Step: Automatic Backup with JetBackup in cPanel

JetBackup is the most common backup add-on on cPanel-based hosting. If your provider includes it, it will appear on the cPanel home screen or under the Files section.

1. Check Whether JetBackup Is Available

  1. Log in to cPanel.
  2. Use the internal search bar and type "backup" or "JetBackup".
  3. If the JetBackup icon appears, you have access to the scheduling tool.

2. Configure Frequency and Destination

  1. Open JetBackup.
  2. Go to the Scheduled Backups tab.
  3. Click Add Schedule.
  4. Choose the type: start with Full Account for complete coverage.
  5. Select the frequency: Daily is recommended for active sites.
  6. Choose the destination: Local, Remote FTP, Amazon S3, Google Drive, etc.
  7. Save the schedule.

Tip: always configure at least one destination outside the server. A local backup living on the same disk is a safety net with a hole in it.

3. Verify the First Backup

After saving the schedule, run a manual backup immediately from the Backup Now tab to confirm the process works and the remote destination is reachable. Wait for the success notification before trusting the automated system.

Alternative: Automatic Backup with Cron Jobs and Scripts

If your plan doesn't include JetBackup, you can automate backups with cPanel's Cron Jobs tool and a shell script. This method requires a bit more technical knowledge but works on nearly any plan with SSH access.

Basic Backup Script

#!/bin/bash
# Save as /home/user/scripts/backup.sh

DATE=$(date +%Y%m%d_%H%M)
DEST="/home/user/backups"
DB_USER="your_db_user"
DB_PASS="your_db_password"
DB_NAME="your_database"

mkdir -p "$DEST"

# Database backup
mysqldump -u"$DB_USER" -p"$DB_PASS" "$DB_NAME" | gzip > "$DEST/db_$DATE.sql.gz"

# Site files backup
tar -czf "$DEST/files_$DATE.tar.gz" /home/user/public_html/

# Delete backups older than 7 days
find "$DEST" -mtime +7 -name "*.gz" -delete

echo "Backup complete: $DATE"

Schedule the Script with Cron Jobs in cPanel

  1. In cPanel, open Cron Jobs.
  2. Under "Add New Cron Job", select a preset frequency or enter a cron expression directly.
  3. In the Command field, enter: /bin/bash /home/user/scripts/backup.sh
  4. For a daily backup at 2 a.m.: 0 2 * * * /bin/bash /home/user/scripts/backup.sh
  5. Save the cron job.

To verify it worked, check for generated files in the /home/user/backups/ folder the following morning.

Restoring a Backup from cPanel

Knowing how to create backups is half the equation; the other half is knowing how to restore them when you actually need to.

Restoring with JetBackup

  1. Open JetBackup and go to the Restore tab.
  2. Select the date of the backup you want to restore.
  3. Choose what to restore: full account, files only, or database only.
  4. Confirm. JetBackup will overwrite the current files with those from the backup.

Restoring Manually (Without JetBackup)

  • Files: upload the .tar.gz file to the server and extract it using cPanel's File Manager or tar -xzf file.tar.gz via SSH.
  • Database: in cPanel, open phpMyAdmin, select your database, click Import, and upload the .sql.gz file.

Looking for hosting that includes daily automatic backups and technical support? Check out the plans at elenlace.com where data protection is part of the base service.

To learn more about protecting your site beyond backups, visit our SSL security and backup resource section.

Key Takeaways

  • Don't rely exclusively on your hosting provider's backups — configure your own automatic copies with a remote destination (FTP, S3, Google Drive).
  • JetBackup is the most convenient tool if your plan includes it; otherwise, a cron job and shell script cover the same function.
  • Follow the 3-2-1 rule: 3 copies, 2 different media, 1 offsite.
  • Use daily backups for active sites; weekly is the bare minimum for any live site.
  • Test a restore at least once before you actually need it.
  • Auto-delete old backups to avoid filling up your disk quota.

Set up your first automatic backup today — and if you'd rather hand it off to experts, the team at elenlace.com can manage your entire backup strategy for you.

FAQ

How often should I back up my website?

It depends on how frequently you update your site. A blog with daily posts needs daily backups. A corporate site updated once a month can get by with weekly backups. The general rule: your backup frequency should match — or exceed — the pace at which your content changes.

Do cPanel backups include the database?

Yes — a Full Account Backup includes files, databases, emails, DNS settings, and server configurations. If you run individual database backups, you need to generate them separately under Backup → MySQL Databases.

How much space do backups take up, and where are they stored?

Size depends on your site; expect anywhere from 50 MB to several GB. Local backups are stored within your hosting account and count against your disk quota — which is why it's essential to also send them to a remote destination and auto-delete old copies using the find -mtime +7 -delete command in the script.

What do I do if a backup exists but I can't restore my site?

First, verify the backup file isn't corrupt by downloading and extracting it locally. Then try restoring the database only (the most common cause of site outages) before restoring all files. If the problem persists, contact your hosting provider with the backup file ready to share.

Useful resources

Other providers and guides worth comparing:

← All