Last updated: July 2025
Applies to: cPanel servers (AlmaLinux / CloudLinux) with SSH and rsync access
Reference: Hetzner Docs – SSH & Rsync Access
🔒 Requirements
- SSH access to your cPanel server (root or privileged user)
- Hetzner StorageBox credentials (username, hostname, and SSH port)
- Rsync installed (
yum install rsyncif needed)
📤 Push from cPanel Server to Hetzner StorageBox
To upload a local directory to your Hetzner StorageBox:
rsync -avp --progress -e "ssh -p 23" /path/to/local/folder exampleuser-sub1@exampleuser.your-storagebox.de:./
🔹 Breakdown:
/path/to/local/folder— Local directory you want to send (e.g.,/home/backups/uk9)exampleuser-sub1@exampleuser.your-storagebox.de— Replace with your StorageBox login-p 23— Hetzner uses SSH port 23./— The destination folder on your StorageBox (default is your root folder)
📥 Pull from Hetzner StorageBox to cPanel Server
To download data from your Hetzner StorageBox:
rsync -avp --progress -e "ssh -p 23" exampleuser-sub1@exampleuser.your-storagebox.de:./ /path/to/local/folder
🔹 Breakdown:
./— The source folder on your StorageBox/path/to/local/folder— Target folder on your server (e.g.,/home/backups/uk9)
✅ Optional Enhancements
- Enable compression for slower links:
rsync -avzp --progress ... - Mirror a directory and delete files not in source:
rsync -avp --delete ... - Dry-run before syncing (no changes made):
rsync -avp --dry-run ...
🛠 Troubleshooting
| Issue | Solution |
|---|---|
| Permission denied | Check your StorageBox credentials (username/password/SSH key) |
| Timeout or connection refused | Ensure port 23 is open outbound in your firewall (try telnet) |
| Path errors | Verify the source and destination directories exist |
