Skip to content

Linux rsync Guide

Mattscreative edited this page Dec 5, 2025 · 3 revisions

Linux rsync Guide

Complete beginner-friendly guide to rsync on Linux, covering Arch Linux, CachyOS, and other distributions including file synchronization, backup strategies, and efficient file transfer.


Table of Contents

  1. rsync Installation
  2. rsync Basics
  3. Synchronization
  4. Remote Sync
  5. Troubleshooting

rsync Installation

Install rsync

Arch/CachyOS:

# Install rsync
sudo pacman -S rsync

Debian/Ubuntu:

sudo apt install rsync

Fedora:

sudo dnf install rsync

rsync Basics

Copy Files

Basic usage:

# Copy files
rsync source/ destination/

# Copies files from source to destination

Dry Run

Test without copying:

# Dry run (test)
rsync -avn source/ destination/

# -a = archive mode
# -v = verbose
# -n = dry run (no actual copy)

Synchronization

Archive Mode

Preserve everything:

# Archive mode
rsync -av source/ destination/

# -a = archive (preserves permissions, timestamps, etc.)
# -v = verbose (shows progress)

Delete Extra Files

Mirror source:

# Delete files not in source
rsync -av --delete source/ destination/

# --delete = removes files not in source

Remote Sync

Over SSH

Remote synchronization:

# Sync to remote server
rsync -av source/ user@server:/path/destination/

# Uses SSH for transfer

From Remote

Download from server:

# Sync from remote server
rsync -av user@server:/path/source/ destination/

# Downloads from remote

Troubleshooting

rsync Not Found

Check installation:

# Check rsync
which rsync

# Install if missing
sudo pacman -S rsync

Permission Denied

Check permissions:

# Ensure read access to source
ls -la source/

# Ensure write access to destination

Summary

This guide covered rsync usage, file synchronization, and backup strategies for Arch Linux, CachyOS, and other distributions.


Next Steps


This guide covers Arch Linux, CachyOS, and other Linux distributions. For distribution-specific details, refer to your distribution's documentation.

Clone this wiki locally