📓
Knowledge
  • Knowledge Base
  • Applications
    • Gitbook
      • CSS Overrides
    • PiHole
      • Automated Whitelist Script
      • Block Lists
      • Config Files
      • DNS over HTTPS
      • Local DNS
    • SSH
      • SCP
      • SSH Keys
        • ssh-add
        • ssh-agent
        • ssh-keygen
      • SSH on Windows
      • SSH on macOS
    • Youtube-DL
      • Youtube-DL Config File
      • Youtube-DL .netrc File
  • Linux
    • Administration
      • dmesg
      • Unattended Upgrades
      • cron
        • cron.d Directory
        • Listing cron jobs
      • sudo
        • BUG: setrlimit(RLIMIT_CORE) Error
        • Add Sudo Privileges to User
      • System Restart Required
    • Applications
      • Apache
      • ddclient
        • Installing Latest (ddclient)
        • Cloudflare DNS (ddclient)
        • Commands (ddclient)
      • PHP
      • NGINX
        • Configuration Files Structure
    • Commands
      • ln -s : Symbolic Links
      • rsync
    • File System
      • File Management
        • Extended Attributes
        • find (command)
        • rsync (command)
        • tar (command)
      • File Sharing
        • AFP
        • SAMBA
        • NFS
      • Volume Management
      • ZFS on Linux
        • Reference Guides
        • Installing ZFS on Debian
        • Migrating ZFS Pools
        • sharenfs - Native ZFS NFS shares
    • Hardware
    • Networking
      • Disable IPv6
    • New System Setup
      • Debian Setup Guides
      • Disable CloudInit (Ubuntu)
      • Recommended packages
    • Package Management
      • apt Commands
      • apt Logs & History
      • Getting info about Packages
      • dpkg
      • dpkg-query
    • Performance & Diagnostics
      • Memory Usage
      • SMART Drive Tools
      • System Information
    • Remote Desktop
    • SystemD
      • Delay Docker until after ZFS init
      • Documentation for SystemD
      • Show Service's Connections
    • Users & Groups
      • Adding New Users
  • Shells
    • Change Default Shell
      • macOS
    • Get Shell Information
    • Screen
    • Terminal Emulators
      • iTerm2
    • zsh
      • macOS Config
  • macOS
    • Hostname - macOS
    • Homebrew
      • Formulae (packages)
        • speedtest-cli
  • BASH
    • Check if File / Directory Exists
  • Docker
    • Docker Networking
    • Install Docker
      • Enable Memory Swappiness - Linux
    • Docker Compose
      • Environmental Variables for Compose
    • Docker Networking
    • Docker Commands
      • docker attach
  • Python
    • Virtual Environments
  • Web Services
    • DNS Records
      • DNS SPF Record
      • WHOIS - Lookup
    • Domain Parking
    • IANA Registered Ports & Services
Powered by GitBook
On this page
  • Reference
  • Syntax
  • Local
  • Access via remote shell
  • Access via rsync daemon
  • Rsync Command Options
  1. Linux
  2. File System
  3. File Management

rsync (command)

Previousfind (command)Nexttar (command)

Last updated 4 years ago

Reference

Syntax

Local

rsync [OPTION...] SRC... [DEST]

Access via remote shell

# Pull:

rsync [OPTION...] [USER@]HOST:SRC... [DEST]

# Push:

rsync [OPTION...] SRC... [USER@]HOST:DEST

Access via rsync daemon

Pull:

  • rsync [OPTION...] [USER@]HOST::SRC... [DEST]

  • rsync [OPTION...] rsync://[USER@]HOST[:PORT]/SRC... [DEST]

Push:

  • rsync [OPTION...] SRC... [USER@]HOST::DEST

  • rsync [OPTION...] SRC... rsync://[USER@]HOST[:PORT]/DEST

Rsync Command Options

Option

Long Option

Description

-a

--archive

archive mode; equals -rlptgoD (no -H,-A,-X)

-v

--verbose

increase verbosity

-r

--recursive

recurse into directories

-x

--xattrs

preserve extended attributes

-A

--acls

preserve ACLs (implies -p)

--stats

give some file-transfer stats

-h

--human-readable

output numbers in a human-readable format

--progress

show progress during transfer

--info=progress2

-P

same as --partial --progress

--partial

-z

--compress

compress file data during the transfer

-b

--backup

With this option, preexisting destination files are renamed as each file is transferred or deleted. You can control where the backup file goes and what (if any) suffix gets appended using the --backup-dir and --suffix options.

--remove-source-files

This tells rsync to remove from the sending side the files (meaning non-directories) that are a part of the transfer and have been successfully duplicated on the receiving side.

rsync(1) - Linux man page
Logo