GHOSTVPS / Backups

Copy files to Storage Box and test a restore with rsync

Preview a small transfer, upload without deletion flags and verify a restored file.

Updated · GhostVPS

Before you start

A Linux/macOS/WSL terminal with SSH and rsync, and Storage Box credentials supplied for your service. Confirm that SSH on port 23 and external access are enabled through service details or GhostVPS support. Replace uXXXXX and the hostname everywhere. Use a dedicated demo directory; the sample check.txt will be overwritten.

Verify the connection and identity

Confirm the SSH host fingerprint against a trusted source before accepting it. The Storage Box endpoint is different from your VPS. Port 23 offers a restricted command environment, not a general-purpose Linux shell. After checking access, exit that remote session and run the remaining commands on the source computer.

Your computer · terminal

ssh -p 23 uXXXXX@uXXXXX.your-storagebox.de
Verify the connection and identity. Real local SSH rehearsal. storage-lab means deploy@localhost:22 in the test container. Your actual Storage Box requires its assigned hostname and port 23.
Verify the connection and identity. Real local SSH rehearsal. storage-lab means deploy@localhost:22 in the test container. Your actual Storage Box requires its assigned hostname and port 23.

Prepare a harmless sample and destination

Create the small sample locally and the destination directory remotely. Do not use these examples to copy a live database or the whole server filesystem. The destination path is relative to your Storage Box account; use the specific account hostname provided for subaccounts.

Your computer · terminal

mkdir -p ./backup-demo
printf 'GhostVPS restore check\n' > ./backup-demo/check.txt
ssh -p 23 uXXXXX@uXXXXX.your-storagebox.de mkdir -p backups/backup-demo
Prepare a harmless sample and destination. Real local SSH rehearsal. storage-lab means deploy@localhost:22 in the test container. Your actual Storage Box requires its assigned hostname and port 23.
Prepare a harmless sample and destination. Real local SSH rehearsal. storage-lab means deploy@localhost:22 in the test container. Your actual Storage Box requires its assigned hostname and port 23.

Preview the transfer

The dry run should list check.txt without uploading its contents. Verify account, source and destination before continuing. The trailing slash copies the directory contents. A permission error or unavailable port should be resolved through account settings/support; do not disable SSH host verification.

Your computer · terminal

rsync -rtv --dry-run -e 'ssh -p 23' ./backup-demo/ uXXXXX@uXXXXX.your-storagebox.de:backups/backup-demo/
Preview the transfer. Real local SSH rehearsal. storage-lab means deploy@localhost:22 in the test container. Your actual Storage Box requires its assigned hostname and port 23.
Preview the transfer. Real local SSH rehearsal. storage-lab means deploy@localhost:22 in the test container. Your actual Storage Box requires its assigned hostname and port 23.

Upload the sample

Run the transfer without –dry-run only after checking the preview. The example does not delete remote-only files, but it can replace a destination file of the same name. No password is placed in the command. A transfer error means the copy is not verified; inspect the exit result before treating it as a backup.

Your computer · terminal

rsync -rtv -e 'ssh -p 23' ./backup-demo/ uXXXXX@uXXXXX.your-storagebox.de:backups/backup-demo/
Upload the sample. Real local SSH rehearsal. storage-lab means deploy@localhost:22 in the test container. Your actual Storage Box requires its assigned hostname and port 23.
Upload the sample. Real local SSH rehearsal. storage-lab means deploy@localhost:22 in the test container. Your actual Storage Box requires its assigned hostname and port 23.

Restore into a new directory and compare

The restore command creates a new temporary local directory and compares the recovered check.txt with the source. No output and exit code zero from cmp indicate equality. This is a file-copy exercise, not a versioned or encrypted-at-rest backup policy. For real backups plan consistent database exports, encryption, retention and regular restore drills; rsync over SSH encrypts transport, not the stored files.

Your computer · terminal

restore_dir=$(mktemp -d) &&
rsync -rtv -e 'ssh -p 23' uXXXXX@uXXXXX.your-storagebox.de:backups/backup-demo/ "$restore_dir/" &&
cmp ./backup-demo/check.txt "$restore_dir/check.txt"
Restore into a new directory and compare. Real local SSH rehearsal. storage-lab means deploy@localhost:22 in the test container. Your actual Storage Box requires its assigned hostname and port 23.
Restore into a new directory and compare. Real local SSH rehearsal. storage-lab means deploy@localhost:22 in the test container. Your actual Storage Box requires its assigned hostname and port 23.

Official references