Important: Backup Frequency
RamNode creates backups on a weekly basis only. Any additional backups beyond this weekly schedule must be created manually by you. You are responsible for maintaining your own backups to ensure data protection.
While we perform server-level backups, they are for disaster recovery only and cannot be guaranteed. Always maintain your own regular backups, especially before making significant changes to your site.
Creating Full Account Backup
Step 1: Access Backup Tool
- Log into cPanel
- Find "Files" section
- Click "Backup"
Step 2: Generate Full Backup
- Under "Full Backup", click "Download a Full Account Backup"
- Select backup destination (usually "Home Directory")
- Enter email address for notification
- Click "Generate Backup"
- Wait for backup to complete (you'll receive email)
- Download the backup file from File Manager
What's Included in Full Backup
Partial Backups
Home Directory Backup
- Go to cPanel → Backup
- Under "Partial Backups", click "Download a Home Directory Backup"
- Backup will download to your computer
MySQL Database Backup
Method 1: Via Backup Tool
- Go to cPanel → Backup
- Under "Partial Backups" → "Download a MySQL Database Backup"
- Click the database name to download
Method 2: Via phpMyAdmin
- Go to cPanel → phpMyAdmin
- Select database from left sidebar
- Click "Export" tab
- Choose "Quick" or "Custom" export method
- Select format (SQL recommended)
- Click "Go" to download
Restoring Backups
Restoring Full Backup
- Go to cPanel → Backup
- Under "Restore", click "Choose File"
- Select your backup file
- Click "Upload"
- Wait for restoration to complete
Warning
Restoring a full backup will overwrite all existing data. Make sure this is what you want before proceeding.
Restoring Database via phpMyAdmin
- Go to cPanel → phpMyAdmin
- Select the database
- Click "Import" tab
- Click "Choose File" and select your .sql backup
- Click "Go" to import
Restoring Website Files
- Upload backup archive to your account via FTP or File Manager
- Extract the archive in the appropriate directory
- Or upload individual files to restore specific items
Backup to RamNode S3
There are several ways to back up cPanel accounts to RamNode S3 buckets, both for individual users and resellers. Below are the recommended approaches.
RamNode S3 Configuration
You'll need the following to connect to RamNode S3:
- Your RamNode S3 access key
- Your RamNode S3 secret key
- The correct endpoint URL (varies by region)
- Bucket name
See our S3 API Quick Start guide for detailed setup instructions.
For Individual cPanel Users (No WHM Access)
Method 1: Manual Backup with Download & Upload
The simplest but least automated approach:
- Use cPanel's Backup Wizard to generate a full account backup
- Download it to your local machine
- Upload to RamNode S3 using s3cmd, rclone, or the S3 browser interface
Method 2: Automated Script via Cron
Create a backup script that runs on a schedule:
#!/bin/bash # backup-to-s3.sh # Configuration CPANEL_USER="yourusername" S3_BUCKET="s3://your-bucket-name" S3_ENDPOINT="https://s3.ramnode.com" # Adjust for your RamNode region BACKUP_DIR="/home/$CPANEL_USER/backups" DATE=$(date +%Y%m%d) # Create backup directory if it doesn't exist mkdir -p $BACKUP_DIR # Generate cPanel backup (this creates a tar.gz in your home directory) uapi --user=$CPANEL_USER Backup fullbackup_to_homedir # Wait for backup to complete (adjust time as needed) sleep 300 # Find the most recent backup file BACKUP_FILE=$(ls -t /home/$CPANEL_USER/backup-*.tar.gz | head -1) # Upload to S3 using s3cmd s3cmd put $BACKUP_FILE $S3_BUCKET/backups/$DATE/ \ --host=$S3_ENDPOINT \ --host-bucket="%(bucket)s.$S3_ENDPOINT" # Optional: Remove local backup after successful upload # rm $BACKUP_FILE
You'll need to configure s3cmd first:
s3cmd --configure
For Resellers (Multiple Accounts)
Automated Multi-Account Backup Script
#!/bin/bash
# reseller-backup-to-s3.sh
S3_BUCKET="s3://reseller-backups"
S3_ENDPOINT="https://s3.ramnode.com"
DATE=$(date +%Y%m%d)
# List of accounts to backup
ACCOUNTS=(
"client1"
"client2"
"client3"
)
for ACCOUNT in "${ACCOUNTS[@]}"; do
echo "Backing up $ACCOUNT..."
# Trigger backup via cPanel API
uapi --user=$ACCOUNT Backup fullbackup_to_homedir
# Wait for backup to generate
sleep 300
# Find and upload the backup
BACKUP_FILE=$(ls -t /home/$ACCOUNT/backup-*.tar.gz | head -1)
if [ -f "$BACKUP_FILE" ]; then
s3cmd put $BACKUP_FILE $S3_BUCKET/$ACCOUNT/$DATE/ \
--host=$S3_ENDPOINT \
--host-bucket="%(bucket)s.$S3_ENDPOINT"
echo "Successfully backed up $ACCOUNT"
# Optional: Clean up local backup
# rm $BACKUP_FILE
else
echo "Backup file not found for $ACCOUNT"
fi
doneUsing Rclone (More Flexible)
Rclone often works better with S3-compatible storage:
# Configure rclone rclone config # In the config, choose: # - S3-compatible storage # - Enter RamNode S3 endpoint # - Enter your access key and secret key
Then modify your script to use rclone:
rclone copy $BACKUP_FILE ramnode-s3:your-bucket/backups/$DATE/
PHP Script for Web-Based Automation
<?php
// backup-manager.php
$accounts = ['client1', 'client2', 'client3'];
$s3_bucket = 'your-bucket-name';
$s3_region = 'us-east-1'; // Adjust for RamNode region
foreach ($accounts as $account) {
// Trigger backup via cPanel UAPI
exec("uapi --user=$account Backup fullbackup_to_homedir");
// Wait for backup
sleep(300);
// Find backup file
$backup_files = glob("/home/$account/backup-*.tar.gz");
if (empty($backup_files)) continue;
rsort($backup_files);
$backup_file = $backup_files[0];
// Upload to S3 using AWS SDK or s3cmd
exec("s3cmd put $backup_file s3://$s3_bucket/$account/" . date('Y-m-d') . "/");
}
?>S3 Backup Best Practices
- • Set up S3 credentials securely - Use .s3cfg file with restricted permissions (600)
- • Schedule via cron - Run backups during off-peak hours
- • Implement rotation - Delete old backups to manage storage costs
- • Monitor backup success - Log outputs and set up alerts
- • Test restores - Regularly verify backups are valid
Automated Backup Solutions
For WordPress Sites
Use WordPress backup plugins:
UpdraftPlus
Most popular, free, supports cloud storage
BackupBuddy
Premium solution with many features
Duplicator
Good for migrations and backups
VaultPress
Real-time backups by Automattic
JetBackup
Some cPanel servers include JetBackup for automated backups with easy restoration.
Backup Best Practices
Backup Frequency
- Daily - For sites with frequent content updates
- Weekly - For moderately active sites
- Monthly - For static sites with rare updates
- Before Changes - Always backup before major updates
Storage Recommendations (3-2-1 Rule)
- 3 copies of data
- 2 different storage types
- 1 copy offsite
- Never store backups only on the same server
What to Backup
All website files
All databases
Email accounts
Troubleshooting
Backup Taking Too Long
- Large sites may take hours to backup
- Consider partial backups for specific parts
- Use FTP to manually backup files
Backup Download Failing
- Check disk space on server
- Try smaller partial backups instead
- Use FTP to download instead of HTTP
Critical Reminder
Backups are useless if you can't restore them. Test your backup restoration process regularly to ensure you can recover your data when needed. The time to test is before disaster strikes, not after.
