Rsync Safe File Transfer and Backup Checklist

halfbrain_logo512adminJune 18, 2026
2 lượt xem

Rsync Safe File Transfer and Backup Checklist

rsync is a powerful tool for copying files between folders or servers. It is useful for backups, migrations, staging copies and syncing website files, but it can also overwrite or delete data if used carelessly.

Core principle

rsync mirrors file state. Always understand source, destination and delete behavior before running it on production data.

Checklist

  1. Identify source path.
  2. Identify destination path.
  3. Confirm trailing slash behavior.
  4. Run dry-run before real sync.
  5. Avoid delete option until you understand impact.
  6. Preserve permissions and ownership when needed.
  7. Exclude cache, temporary files or backups if needed.
  8. Log the sync result.
  9. Verify destination files.
  10. Document the sync command.

Reusable lesson

rsync applies to WordPress migrations, backups, staging copies, config backups, media transfers, Docker bind mounts and disaster recovery.

Checklist Type Backup & Recovery
Level Intermediate
Risk Level High Risk
Estimated Time 30–90 minutes

When to Use This Checklist

Use this checklist when syncing website files, creating staging copies, moving media, backing up configs or migrating server data.

Required Tools

SSH access, rsync, source path, destination path, backup destination, enough disk space

Before You Start

Do not run rsync with --delete until you are completely sure the destination should mirror the source.

Structured Checklist Steps

  1. Confirm source.
  2. Confirm destination.
  3. Check trailing slash.
  4. Run dry-run.
  5. Avoid unsafe delete.
  6. Preserve permissions.
  7. Set excludes.
  8. Log result.
  9. Verify destination.
  10. Save command.

Verification Steps

  1. Dry-run output is reviewed.
  2. Destination path is correct.
  3. Important files are copied.
  4. Permissions are acceptable.
  5. No unexpected deletion occurs.

Common Mistakes

  • Mixing up source and destination.
  • Misunderstanding trailing slash behavior.
  • Using --delete blindly.
  • No dry-run.
  • Syncing cache or temporary files unnecessarily.

Related Commands

rsync -av --dry-run /var/www/example.com/ /backup/example.com/
rsync -av /var/www/example.com/ /backup/example.com/
rsync -av --exclude='cache/' /var/www/example.com/ /backup/example.com/
rsync -avz /var/www/example.com/ user@server:/backup/example.com/

Share:

Disclaimer: The guides, checklists, commands, and examples on HalfBrain.net are provided for educational and operational reference only. Server environments, hosting providers, software versions, security settings, and WordPress configurations can vary, so you should always review commands before running them on your own system. We do our best to keep the content accurate and useful, but we cannot guarantee that every command, configuration, or recommendation will fit every environment. Always back up your website, database, and server configuration before making changes. HalfBrain.net is not responsible for data loss, downtime, security incidents, misconfiguration, or other issues that may result from applying the information on this website. Use the material at your own discretion.

Leave a Reply

Your email address will not be published. Required fields are marked *