BackupsRestorationcPanel4 min read

Backups and restoration in cPanel

Full and partial backups, JetBackup, restore files, databases and emails.


Importance of backups

Backups are your safety net. A human error, a hack or a failed update can leave your site inaccessible. At Baires Host we offer automatic daily backups with JetBackup.

Full backup from cPanel

  1. Log in to cPanel
  2. Go to FilesBackup or Backup Wizard
  3. Click Download a Full Account Backup
  4. Select destination: Home Directory
  5. Click Generate Backup
  6. When ready, download the file

Note: The full backup includes files, databases, emails and configuration.

Partial backups

From the same section you can download separately:

  • Home Directory: Files only
  • MySQL Databases: Each individual database
  • Email Forwarders/Filters: Email configuration

JetBackup (automatic backups)

JetBackup maintains daily copies of your account:

  1. In cPanel → FilesJetBackup
  2. Select the restoration type:
  • Full Account: Restore everything
  • Files: Specific files
  • Databases: Databases
  • Emails: Email accounts
  • Cron Jobs: Scheduled tasks

Restore specific files

  1. In JetBackup → File Backups
  2. Select the backup date
  3. Navigate to the file or folder
  4. Click Restore or Download

Restore a database

  1. In JetBackup → Database Backups
  2. Select the database
  3. Choose the date
  4. Click Restore

Restore emails

  1. In JetBackup → Email Backups
  2. Select the email account
  3. Choose the date
  4. Click Restore

Manual backup via SSH

bash
# File backup
tar -czf ~/backup-$(date +%Y%m%d).tar.gz public_html/

# Database backup
mysqldump -u username -p database_name > ~/db-backup-$(date +%Y%m%d).sql

# Full backup (files + DB)
tar -czf ~/full-backup-$(date +%Y%m%d).tar.gz public_html/ db-backup-*.sql

Schedule automatic backups with Cron

bash
# Daily backup at 3 AM
0 3 * * * tar -czf ~/backups/site-$(date +\%Y\%m\%d).tar.gz ~/public_html/

# Weekly database backup
0 4 * * 0 mysqldump -u user -pPASS dbname > ~/backups/db-$(date +\%Y\%m\%d).sql

Restore a full backup

bash
# Extract files
cd ~/public_html
tar -xzf ~/backup-20260115.tar.gz

# Import database
mysql -u username -p database_name < ~/db-backup-20260115.sql

Best practices

  • Download a local backup at least once a week
  • Verify that backups can be restored (test in a staging environment)
  • Keep at least 7 days of backups
  • Make a backup BEFORE any major update
  • Store backups in an external location (Google Drive, S3, etc.)

Was this guide helpful?