📡 Push & Pull To/From Hetzner StorageBox using rsync

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 rsync if 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 [email protected]:./

🔹 Breakdown:

  • /path/to/local/folder — Local directory you want to send (e.g., /home/backups/uk9)
  • [email protected] — 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" [email protected]:./ /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

IssueSolution
Permission deniedCheck your StorageBox credentials (username/password/SSH key)
Timeout or connection refusedEnsure port 23 is open outbound in your firewall (try telnet)
Path errorsVerify the source and destination directories exist
Scroll to Top