Transfer WHM Backups to Remote Destination via FTP
In this article
To transfer WHM backups to a remote destination via FTP, you must configure the Backup Configuration menu in WHM to use the FTP destination type, enter your remote server credentials, and save the settings to automate the transfer process. This ensures that your server data is stored off-site, protecting your accounts from data loss in the event of a primary server failure.
Moving backups to a remote server is a critical part of a disaster recovery strategy. Storing backups on the same disk as your live websites is risky; if the hardware fails or the filesystem becomes corrupted, you lose both your live site and your recovery points. By utilizing FTP (File Transfer Protocol), you can send these compressed archives to a separate storage server or a dedicated backup VPS.
What You'll Need
- Root access to your WHM (Web Host Manager) panel.
- A remote server or storage account that supports FTP access.
- The FTP hostname or IP address of the remote destination.
- A valid FTP username and password.
- Sufficient disk space on the remote destination to hold all server backups.
- The remote FTP directory path where you want the backups to be stored.
Step-by-Step
- Log in to your WHM panel as the root user.
- Navigate to the backup configuration area. In the search bar on the left, type "Backup Configuration" and select it from the results. (Note: Menu labels may differ slightly depending on your cPanel/WHM version).
- Locate the section labeled "Global Settings". Ensure that the checkbox for "Enable Backups" is checked. If this is not enabled, no backups will be generated regardless of the destination settings.
- Scroll down to the "Backup Destination" section. You will see several radio buttons for different destination types. Select the option for "FTP".
- Once FTP is selected, a set of configuration fields will appear. Fill them out as follows:
- FTP Server: Enter the IP address or the hostname of your remote storage server.
- FTP Username: Enter the username assigned to the FTP account on the remote server.
- FTP Password: Enter the password associated with that FTP account.
- Remote Directory: Specify the folder on the remote server where the backups should be placed. If you want them in the root directory of the FTP account, you can often leave this blank or enter a single forward slash (/).
- Configure your backup type. Under the "Backup Scheduling" section, choose whether you want Daily, Weekly, or Monthly backups. It is recommended to have at least one daily backup for critical data.
- Select the backup retention settings. Decide how many backups you want to keep before the system begins overwriting the oldest ones. For example, keeping 7 daily backups ensures you have a full week of recovery points.
- Review the "Backup Selection" settings. You can choose to back up all accounts or select specific ones. Ensure that "Back up MySQL Databases" and "Back up Home Directories" are both enabled to get a complete image of your accounts.
- Scroll to the bottom of the page and click the "Save" button. WHM will now apply these settings to the next scheduled backup run.
- To verify the configuration immediately without waiting for the schedule, you can run a manual backup via the command line or wait for the next cycle and check the "Backup User Data" logs in WHM.
Common Mistakes
One of the most frequent errors is providing a remote directory path that the FTP user does not have permission to write to. If the FTP account is "chrooted" to a specific folder, entering a full system path (like /home/username/backups) may fail because the FTP user only sees their own home directory as the root. In such cases, using a relative path or just the folder name is necessary.
Another common mistake is ignoring the disk space on the remote server. WHM backups can be massive, especially for servers with many high-traffic accounts. If the remote disk fills up, the FTP transfer will fail mid-process, often leaving behind corrupted or partial backup files that are useless during a restore.
Some users forget to check their firewall settings. If the remote server has a firewall (like CSF or iptables) that does not whitelist the IP of the WHM server, the connection will be timed out or refused. Similarly, if the local WHM server has strict outbound rules, it may block the FTP ports (usually port 21).
Using plain FTP instead of SFTP or FTPS is a security risk. Standard FTP sends your username and password in clear text across the network. If your remote server supports it, always look for secure alternatives, although the basic FTP option in WHM is the most common starting point for simple storage setups.
Tips
To optimize the transfer process, consider using "Compressed" backups. This reduces the size of the files being sent over the network, which speeds up the transfer and saves space on your remote destination. This is found in the Backup Configuration settings under the compression options.
Implement a naming convention for your remote directories. If you manage multiple servers, create separate folders on your remote storage for each server (e.g., /backups/server1, /backups/server2). This prevents files from different servers from overwriting each other if they happen to have accounts with the same name.
Schedule your backups during low-traffic hours. The process of compressing and transferring large amounts of data can cause a spike in CPU and I/O usage. Setting the backup to run at 2:00 AM local time typically minimizes the impact on your website visitors.
Periodically test your backups. A backup is only useful if it actually works. Once a month, try downloading a backup file from the remote FTP server and restoring a single account to a test environment to ensure the data is intact and the archives are not corrupted.
Troubleshooting
If your backups are not appearing on the remote server, the first step is to check the backup logs. In WHM, you can find these logs under the "Backup User Data" or by checking the system logs via SSH. Look for errors such as "Authentication failed" or "Connection timed out".
If you see an "Authentication failed" error, double-check your FTP credentials. Try logging into the remote server using a standalone FTP client (like FileZilla) from your local computer. If that works, the credentials are correct, and the issue may be related to the WHM server's ability to reach the remote host.
If the connection times out, check the firewall on both the source and destination servers. Ensure that port 21 is open for outbound traffic on the WHM server and open for inbound traffic on the remote server. If you are using a cloud provider, check the "Security Groups" or "Network ACLs" in the provider's dashboard.
If the backup starts but fails halfway through, check the disk quota of the FTP user on the remote server. If the user has a strict quota, the transfer will stop as soon as that limit is reached. Increase the quota or clear out old backups to make room for new ones.
In cases where the connection is unstable, try switching from "Passive" to "Active" mode if your remote server configuration allows it, although Passive mode is generally the default and most compatible with modern firewalls.
Frequently Asked Questions
Can I use SFTP instead of FTP in WHM?
Yes, modern versions of WHM support SFTP (SSH File Transfer Protocol), which is significantly more secure than standard FTP. You can select this in the Backup Destination dropdown menu and provide the SSH port and credentials.
Will transferring backups to FTP slow down my website?
The transfer itself happens in the background. However, the initial process of creating the backup (compressing files and dumping databases) uses CPU and disk I/O, which can slow down the site. Schedule backups for off-peak hours to avoid this.
Do I need to manually delete old backups on the FTP server?
No, if you have configured the "Backup Retention" settings in WHM, the system will automatically manage the rotation. It will overwrite or delete the oldest backups based on the number of copies you chose to keep.
What happens if the FTP server is offline during a backup?
If the destination is unreachable, WHM will log a failure in the backup logs. The backup will not be transferred, and you will not have a remote copy for that specific date. It is important to monitor your logs to catch these failures early.
Can I send backups to a Google Drive or Dropbox account?
WHM does not natively support Google Drive or Dropbox via the FTP menu. To achieve this, you would need to use a third-party plugin or a script (like Rclone) to sync the local backup folder to a cloud storage provider.
Is it possible to back up only specific accounts to the remote FTP?
Yes. In the Backup Configuration menu, you can choose to exclude specific accounts from the backup process, ensuring that only the necessary data is sent to your remote storage.