๐Ÿ“ก 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 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

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