DevOps / Scripts bash Intermediate

Rsync Deploy Script

Deploy a build folder to a remote server via rsync with checksums and delete orphans.

bash
#!/bin/bash
SRC=./dist/
DEST=user@prod.example.com:/var/www/myapp/
rsync -avz --checksum --delete $SRC $DEST
echo "Deploy complete $(date)"

Prerequisites

  • rsync
  • SSH access

Pro Tips

  • → Add --dry-run first to preview what will change.

Was this module useful?

Share your experience — it helps the team improve.

Leave Feedback

Commercial Licensing

Acquire a production access token or template license for enterprise deployment.

Module Info

Language
bash
Level
Intermediate
Read time
2 min
Published
Jun 2025
License
Commercial License

Newsletter

New modules every week, directly to your inbox.