Overview
rsync copies files efficiently by transferring only the differences since the last run, which makes it ideal for recurring server backups. This article shows how to back up a CPU Pod to an ALYPOD Storage Box over SSH, including a first run and incremental updates.
Before you begin
- A CPU Pod running any Linux distribution (root or sudo access).
- An ALYPOD Storage Box with its hostname, username and password.
rsyncinstalled on the Pod.
Steps
- Install rsync:
```bash
Debian / Ubuntu
sudo apt update && sudo apt install -y rsync
RHEL / AlmaLinux / Rocky
sudo dnf install -y rsync ```
- Run a first full backup into a dated folder. The
-apreserves permissions and timestamps,-zcompresses, and--deletemirrors deletions:
bash
rsync -avz --delete \
-e "ssh -p 22" \
/var/www /etc /home \
[email protected]:/backup/server1/
- For speed and repeatability, use rsync over SSH with a key instead of a password:
bash
ssh-keygen -t ed25519 -N "" -f ~/.ssh/alypod_backup
ssh-copy-id -i ~/.ssh/alypod_backup.pub [email protected]
Note: Storage Box SSH keys are registered from its settings page in the Console if
ssh-copy-id is not available.
- Exclude volatile paths you do not need (caches, sockets, temporary data):
bash
rsync -avz --delete \
--exclude '*/cache/*' --exclude '*.sock' --exclude '/proc' --exclude '/sys' \
/ [email protected]:/backup/server1/
- For versioned backups, use
--link-destto hard-link against yesterday's copy so only changed files consume space:
bash
rsync -avz --delete --link-dest=../2026-10-06 \
/var/www /backup/2026-10-07/
- Verify the result and check free space:
bash
ssh [email protected] "du -sh /backup/server1"
Troubleshooting
- Problem:
rsync: command not foundon the remote. Solution: Use--rsync-path=rsyncor rely on SFTP mode with-e ssh; Storage Boxes expose rsync directly. - Problem: Slow first transfer. Solution: Run with
--compressand consider an initial copy locally, then sync deltas. - Problem: Backup overwrote live files accidentally. Solution: Always double-check
source/target order — the source comes first, destination last. Use
-n(--dry-run) before the first real run.
Related articles
- [Scheduling automatic backups with cron]
- [Restoring data from a backup]
- [Connecting to a Storage Box over SFTP and SSHFS]
