Questions tagged [rsync]

Rsync is an open source command line tool for Unix and Windows systems that provides fast incremental file transfer to copy files and synchronize directories locally or between remote hosts. It is widely used for mirroring and backup.

This open source command line tool provides fast incremental file transfer to copy files and synchronize directories locally or between remote hosts. It is widely used for mirroring and backup.

Links

Alternatives

1352 questions
180
votes
4 answers

What are the differences between the rsync delete options?

I see on the rsync man page that there are a number of delete options, but don't really understand the differences between them. What are the differences between these options? --del an alias for --delete-during --delete …
Skilldrick
  • 2,087
  • 3
  • 17
  • 15
138
votes
16 answers

How to synchronize the home folder between multiple computers?

I have three computers at home, and would like to have the /home/ folder tree synchronized between the three. Any files/folders (except those hidden) that are modified/added/removed in one of the three computers is updated in the other two. Is rsync…
lamcro
  • 812
  • 2
  • 19
  • 23
131
votes
2 answers

rsync and symbolic links

I want to backup my home directory to an external drive nightly using a cron job to execute rsync. I am unsure of the exact behavior of rsync's symbolic link flags. rsync's -a flag includes the -l flag (i.e. "copy symlinks as symlinks"). Does…
sean
  • 1,465
  • 2
  • 10
  • 5
112
votes
12 answers

How to speed up rsync between two local disks?

I'm running rsync to sync a directory onto my external USB HDD. It's about 150 gigs of data. 50000+ files I would guess. It's running it's first sync at the moment, but its copying files at a rate of only 1-5 MB/s. That seems incredibly slow for a…
Jake Wilson
  • 4,314
  • 10
  • 38
  • 39
100
votes
2 answers

What is Git Bash for Windows anyway?

I have happily been using Git and Git Bash from https://git-scm.com/. There is a page with more information here: https://git-for-windows.github.io/. Yesterday I ran into a problem with rsync, and I started digging deeper into Git Bash for Windows.…
geneorama
  • 1,380
  • 2
  • 11
  • 15
92
votes
3 answers

Do I need to have a passphrase for my SSH RSA key?

Before I started at my current job (at a small business), my office had no firewall on the network and literally nothing was ever being backed up. Now that I've signed on as a dedicated sysadmin / one-man-IT-department, I've been doing what I can to…
eckza
  • 1,164
  • 1
  • 8
  • 16
69
votes
1 answer

Does rsync delete files, folders at destination by default?

Files Suppose that /foo/src contains only A.c and that /foo/dest contains both A.c and B.c. And suppose I run the following command: rsync /foo/src/ /foo/dest Will rsync erase B.c? Folders Now suppose that /foo/src contains the directory A with…
Crowder
  • 882
  • 1
  • 7
  • 9
65
votes
6 answers

Why is rsync -avz faster than scp -r?

I'm a bit puzzled by this? Why is rsync faster than scp? Doesn't rsync use scp beneath or does it do something more efficient? Is there some way to speed up scp?
grm
  • 2,504
  • 3
  • 28
  • 29
60
votes
1 answer

Which is the rsync command to “smartly” merge two folders?

I have some folders that got duplicated by mistake and I have to merge them together. Let's say folder A contain file X and folder B contains file Y, I would like to get file X copied to folder B. But, of course, I can face more complex cases, where…
Tiziano Solignani
  • 603
  • 1
  • 6
  • 6
59
votes
11 answers

Run rsync with root permission on remote machine

I want to sync a folder from my machine with a folder on a remote machine. The remote folder can only be manipulated by root. I have an account on the remote machine which can use sudo. How can I run rsync such that it has root permissions on the…
Peter
  • 903
  • 1
  • 7
  • 12
57
votes
7 answers

How to print files that would have been changed using rsync?

Is there a way to get rsync to print the full filepaths to all files that are different without actually transferring any files? Alternatively, I need a way to diff the files across two trees (over SSH) based only on change in size or last-modified…
Joe Tsai
  • 579
  • 1
  • 4
  • 3
57
votes
10 answers

How to do rsync-like encrypted backup?

I want to save a backup of my data on a remote server, but never want the backup server to see the data unencrypted. Editing a single file and backing up should not result in everything being encrypted and sent again. The remote server should…
user67194
55
votes
5 answers

Resume rsync over SSH after broken connection?

I have to transfer large amounts of data (>80 GB) over ssh using rsync. Everything is working fine, but the DSL connection where the backup data is sent from will drop once every 24h for up to 3 minutes (switching providers is not an option). How do…
Andreas
54
votes
3 answers

rsync - does it create a temp file during transfer?

As far as I can see rsync doesn't create the file in the target directory until it is complete. This must mean that it creates the file in a temp directory somewhere and copies the file into the target directory when it is complete. First off, is…
Cheetah
  • 1,233
  • 6
  • 20
  • 26
52
votes
5 answers

Rsync files via intermediate host

I am currently away from my LAN and I need to do a backup of my laptop. I have a somewhat recent copy of my laptop on my server and I usually back the laptop up using rsync. Now I wish to do that, but outside of my LAN. In short I want to send data…
GLaDER
  • 761
  • 1
  • 5
  • 8
1
2 3
90 91