Cloud House Technologies Logo
CloudHouse Technologies
HomeServicesProjectsBlogAbout UsCareersContact UsLogin
    Cloud House Technologies Logo
    CloudHouse Technologies
    HomeServicesProjectsBlogAbout UsCareersContact UsLogin

    How to Set Up cPanel/WHM Backup to a Remote SFTP Server (2026 Guide)

    Priya

    Content Writer & Researcher

    Last Updated: 11 July 2026
    🖥️

    Are Your cPanel Backups Actually Going Off-Site?

    Local-only backups give false confidence. CloudHouse configures SFTP off-site backups, sets up retention policies, and verifies restores — so you're actually protected when disaster strikes.

    🔧 Book Free DiagnosisCall NowWhatsApp
    🖥️12,400+PCs Fixed
    ⭐4.9★Google Rating
    ⚡<15 minAvg. Response
    🛡️ISO 27001Certified

    Storing backups on the same server as your data is not a backup strategy — it's a false sense of security. A single server failure, ransomware attack, or datacenter fire eliminates both your production data and your local backups simultaneously. Configuring cPanel/WHM backup to a remote SFTP server moves copies off-site automatically, ensuring your clients' data survives even a total server loss. This guide covers the complete setup from SSH key generation to scheduled backups and verified restores.

    Why SFTP Is the Best Remote Backup Transport for cPanel

    cPanel/WHM supports several remote backup destinations: FTP, SFTP, S3, Google Drive, and WebDAV. SFTP is the recommended choice for most hosting operations because:

    • Encryption in transit: All data travels over SSH — no plaintext credentials or data on the wire
    • Key-based authentication: No password to brute-force or leak
    • Universal compatibility: Any Linux/BSD server can act as an SFTP backup destination
    • Cost-effective: You control the destination server — no per-GB cloud storage fees
    • Rsync-compatible: Can be combined with rsync for incremental transfers

    💡 None of these worked? Skip the guesswork.

    Get Expert Help →

    Step 1 — Prepare the Remote SFTP Backup Server

    You need a second server to receive backups. This could be a cheap VPS at a different datacenter, a dedicated NAS, or a cloud storage server.

    1Create a dedicated backup user on the remote server
    # On the REMOTE backup server (SSH in as root)
    useradd -m -s /bin/bash backupuser
    passwd backupuser   # set a strong password (will be replaced with key auth)
    
    # Create the backup directory
    mkdir -p /home/backupuser/cpanel-backups
    chown backupuser:backupuser /home/backupuser/cpanel-backups
    chmod 700 /home/backupuser/cpanel-backups
    2Ensure SSH/SFTP is enabled on the remote server
    systemctl status sshd   # should be active/running
    # Verify SFTP subsystem is configured:
    grep "Subsystem" /etc/ssh/sshd_config
    # Should show: Subsystem sftp /usr/lib/openssh/sftp-server (or similar path)
    1Generate an SSH key pair on your cPanel server
    # On your CPANEL server (as root)
    ssh-keygen -t ed25519 -f /root/.ssh/cpanel_backup_key -N "" -C "cPanel backup key"
    # This creates:
    #   /root/.ssh/cpanel_backup_key      (private key — keep secure)
    #   /root/.ssh/cpanel_backup_key.pub  (public key — copy to remote)
    2Copy the public key to the remote backup server
    # Method 1: Using ssh-copy-id
    ssh-copy-id -i /root/.ssh/cpanel_backup_key.pub backupuser@REMOTE_SERVER_IP
    
    # Method 2: Manual copy
    cat /root/.ssh/cpanel_backup_key.pub |   ssh backupuser@REMOTE_SERVER_IP "mkdir -p ~/.ssh && cat >> ~/.ssh/authorized_keys && chmod 600 ~/.ssh/authorized_keys"
    3Test the SSH connection
    ssh -i /root/.ssh/cpanel_backup_key backupuser@REMOTE_SERVER_IP "echo Connection OK && df -h"
    # Should connect without prompting for a password
    1Log in to WHM → Backup → Backup Configuration
    2Enable backups and set the type

    Under Global Settings:

    • Set Backup Status to Enabled
    • Set Backup Type to Compressed (balances size and restore speed) or Incremental (faster, less storage)
    3Configure backup schedule

    Under Scheduling and Retention:

    • Enable Daily Backups — set time to off-peak hours (2:00–4:00 AM)
    • Set Retention to 7 daily backups (keeps one week of history)
    • Enable Weekly Backups on Sunday, retain 4 copies
    • Enable Monthly Backups, retain 3 copies
    4Add the SFTP remote destination

    Under Additional Destinations, click Create new destination:

    • Destination Type: SFTP
    • Destination Name: Remote Backup Server (descriptive label)
    • Transfer System User: root
    • Remote Host: your backup server IP or hostname
    • Port: 22 (or your custom SSH port)
    • Remote Account: backupuser
    • Remote Password: leave blank (using key auth)
    • Private Key: paste the content of /root/.ssh/cpanel_backup_key
    • Remote Backup Directory: /home/backupuser/cpanel-backups
    • Timeout: 30 seconds
    5Click "Save and Validate Destination"

    WHM tests the SFTP connection. If validation fails, check: SSH port accessibility, firewall rules on the remote server, and that the private key content was pasted correctly including the -----BEGIN/END----- headers.

    Step 4 — Configure What to Back Up

    Under Files in the Backup Configuration:

    • Enable Back up accounts
    • Enable Back up system files (includes Apache vhosts, Exim config, cron jobs)
    • Enable Back up databases (MySQL databases per account)
    • Enable Back up email

    Under Databases, select Per Account and Entire MySQL Directory for maximum recoverability.

    Step 5 — Monitor Backup Success and Storage Usage

    # Check backup logs on the cPanel server
    tail -50 /usr/local/cpanel/logs/cpbackup/backup-*.log
    
    # Check if backups arrived on the remote server
    ssh -i /root/.ssh/cpanel_backup_key backupuser@REMOTE_SERVER_IP   "ls -lh /home/backupuser/cpanel-backups/ && df -h /home/backupuser"
    
    # Set up a cron alert if no new backup arrived today
    # Add to root crontab on remote server:
    0 8 * * * LATEST=$(find /home/backupuser/cpanel-backups -name "*.tar.gz" -mtime -1 | wc -l);   [ "$LATEST" -lt 1 ] && echo "WARNING: No cPanel backup received today on $(hostname)" |   mail -s "Backup Alert" admin@yourdomain.com

    Step 6 — Test a Restore

    A backup you haven't tested is not a backup. At least monthly, test restoring a single account:

    1. In WHM, go to Backup → Restore a Full Backup/cpmove File

    2. Download a backup archive from the remote server to the cPanel server's backup directory

    3. Select the archive and restore to a test account name

    4. Verify the website, databases, and email are intact on the restored account

    5. Delete the test account after verification

    A complete off-site backup strategy gives you confidence that any disaster — server compromise, hardware failure, accidental deletion — can be recovered from quickly. CloudHouse Technologies provides managed cPanel/WHM server support including backup configuration, restore testing, and 24/7 monitoring to ensure your backup pipeline never silently fails.

    Get the Free Linux Server Admin Cheatsheet (PDF)

    Essential commands for server management, networking, and troubleshooting — all on one printable page.

    Running Linux servers? Let us manage them for you.

    Our Managed Linux Server plans cover updates, security hardening, monitoring, and 24/7 incident response — so your servers stay up and your team stays focused.

    • Proactive OS patching and security updates
    • 24×7 monitoring with instant alerting
    • Backup configuration and disaster recovery
    • Dedicated Linux engineers on call
    See Pricing Plans →

    What our customers say

    “Our production server went down at 2 AM. CloudHouse had it back online in under 20 minutes. Incredible response time.”

    Arun S.

    CTO, SaaS Startup

    “They migrated our entire infrastructure from Ubuntu 18 to 22 with zero downtime. Couldn't have asked for better.”

    Deepak N.

    DevOps Lead

    Frequently Asked Questions

    In WHM, go to Backup → Backup Configuration → Additional Destinations → Create new destination → select SFTP. Enter the remote server hostname, SSH port, username, and paste your SSH private key. Set the remote backup directory path and click Save and Validate Destination. WHM tests the connection and starts sending backups to the remote server on your configured schedule.

    Book your free 15-minute diagnosis

    A certified technician will call you back within 15 minutes during business hours.

    Share this article

    Leave a Comment

    Comments (0)

    Loading comments...

    cPanel Backup Not Reaching Your Backup Server?

    SFTP backup failures are silent by default in WHM — you only discover the problem when you need to restore. CloudHouse sets up reliable off-site backup pipelines with alerting so you always know your backups are working.

    Call Now — FreeWhatsApp Us

    Why CloudHouse?

    • ISO 27001:2022 certified
    • 12,400+ devices supported
    • 4.9★ on Google
    • Sub-15-minute response

    CloudHouse Technologies

    Innovative cloud solutions for modern businesses. We deliver cutting-edge technology with exceptional service.

    Contact Us

    CloudHouse Technologies Pvt.Ltd
    Special Economic Zone(SEZ),
    Infopark Thirissur,4B-15,
    Indeevaram,Nalukettu Road,
    Koratty, Kerala, India-680308
    0480-27327360
    info@cloudhousetechnologies.com

    Quick Links

    • Our Services
    • Gold Loan Software
    • About Us
    • Contact
    • Terms and Conditions
    • Privacy Policy
    ISO27001:2022
    Certified

    © 2026 CloudHouse Technologies Pvt.Ltd. All rights reserved.

    Back to top