LinuxAlternative

Linux · Internet

rsync

rsync is a command-line tool for efficiently syncing files and directories locally or over a network.

Código abertoGrátis
Seja o primeiro a avaliar
Licença
GPL-3.0
Versão mais recente
3.5.1

O que é o rsync?

rsync has been a core Linux tool since the late 1990s, known for its efficient delta-sync algorithm that transfers only changed parts of files. It's mature, stable, and included by default in most distributions. Its reliability and network efficiency have made it a standard in system administration and backup workflows.

It's best for users comfortable with the terminal, including system admins, developers, and Linux-savvy users who need precise control over file transfers. While it lacks a GUI, its scripting capability makes it ideal for automation. Not aimed at casual users who prefer point-and-click.

Compared to Resilio Sync, rsync is not peer-to-peer and doesn’t sync in real time. It requires manual or scripted execution, not continuous background syncing. However, it’s more predictable and transparent, especially over SSH. It feels less 'automatic' but far more controllable and secure when used correctly.

Ideal para: Automating secure, efficient file synchronization between trusted systems.

Principais recursos do rsync

  • Efficient delta syncing reduces bandwidth use
  • Supports local and remote transfers over SSH
  • Preserves permissions, symlinks, and timestamps
  • Can resume interrupted transfers
  • Filter rules for include/exclude patterns
  • Scriptable and ideal for cron automation
  • Works over any shell-accessible connection

Prós

  • Extremely reliable and battle-tested
  • Minimal network usage due to delta algorithm
  • Available on nearly every Unix-like system
  • Secure when used with SSH
  • Highly scriptable for automation

Contras

  • No GUI — entirely command-line driven
  • Not designed for real-time syncing
  • Steeper learning curve for beginners
  • No built-in peer discovery or encryption beyond SSH

Programas do Windows que o rsync substitui

Como instalar o rsync no Linux

Ubuntu / Mintsudo apt install rsync
Debiansudo apt install rsync
Fedorasudo dnf install rsync
Arch / Manjarosudo pacman -S rsync
openSUSEsudo zypper install rsync

Dicas para quem vem do Windows

Unlike Resilio Sync, rsync doesn’t run as a background service by default. You’ll need to run it manually or via cron. It doesn’t use a proprietary file format — just regular files and directories. Use SSH keys for passwordless auth. Replace Resilio’s automatic sync with scripts calling rsync with --archive and --delete flags as needed.

rsync: perguntas frequentes

Can rsync sync files in real time like Resilio?

No, rsync is not real-time. You must trigger it manually or via a scheduler like cron. For automatic syncing, combine it with inotify tools like 'inotifywait'.

Is rsync secure for transferring over the internet?

Yes, when used over SSH, rsync encrypts data and verifies hosts. Never use unencrypted protocols like rsh in production environments.

How do I resume a failed rsync transfer?

Use the --partial or --partial-dir option to keep incomplete files. Rerunning the same command will resume from where it left off.

Can rsync sync two directories on the same machine?

Yes. rsync works locally too. Use it to mirror directories with rsync -a /source/ /dest/ for efficient local copies.

Atualizado em