Questions tagged [rsync]

Rsync is a fast and extraordinarily versatile file copying tool. It can copy locally, to/from another host over any remote shell, or to/from a remote rsync daemon

Rsync is a fast and extraordinarily versatile file copying tool. It can copy locally, to/from another host over any remote shell, or to/from a remote rsync daemon. It offers a large number of options that control every aspect of its behavior and permit very flexible specification of the set of files to be copied. It is famous for its delta-transfer algorithm, which reduces the amount of data sent over the network by sending only the differences between the source files and the existing files in the destination. Rsync is widely used for backups and mirroring and as an improved copy command for everyday use.

Rsync website

1595 questions
372
votes
20 answers

Showing total progress in rsync: is it possible?

I have searched for this option already, but have only found solutions that involve custom patching. The fact that it does not show in --help and no more info can be found probably indicates the answers is 'no', but I'd like to see this…
Aron Rotteveel
  • 8,449
  • 17
  • 53
  • 64
336
votes
18 answers

Copying a large directory tree locally? cp or rsync?

I have to copy a large directory tree, about 1.8 TB. It's all local. Out of habit I'd use rsync, however I wonder if there's much point, and if I should rather use cp. I'm worried about permissions and uid/gid, since they have to be preserved in the…
Amandasaurus
  • 31,471
  • 65
  • 192
  • 253
263
votes
3 answers

What is archive mode in rsync?

I know you can use -a or --archive to activate archive mode when using rsync. Unfortunately, I have no idea what archive mode is supposed to do, and the man page is not at all explicit about what this is: equals -rlptgoD (no -H,-A,-X) Can you…
allyourcode
  • 2,777
  • 2
  • 16
  • 6
211
votes
18 answers

How to use rsync over FTP

Any unix: I have the following cmd line which works fine. rsync -avr -e ssh /home/dir user@example.com:/home/ But I need to set it up now to rsync to a remote server that only has an FTP server on it. How do I go about that? I looked at the rsync…
bumperbox
  • 2,313
  • 3
  • 16
  • 13
134
votes
5 answers

Rsync difference between --checksum and --ignore-times options

Can anyone clarify the differences between the --checksum and --ignore-times options of rsync? My understanding is as follows: --checksum If the file size and time match, it will do a checksum at both ends to see if the files are really…
Andy Madge
  • 1,607
  • 2
  • 14
  • 14
101
votes
3 answers

Perform rsync while following sym links

I have a directory that contains symbolic links to other directories located on different media on my system: /opt/lun1/2011 /opt/lun1/2010 /opt/lun2/2009 /opt/lun2/2008 /opt/lun3/2007 But the symbolic links show up…
ensnare
  • 2,212
  • 7
  • 24
  • 40
97
votes
18 answers

Why hasn't rsync caught on in the Windows world?

It seems that rsync is the de-facto standard for efficient file backup and sync in Unix/Linux. Does anyone have any thoughts on why it wouldn't have caught on in the Windows world? Why hasn't it become a universal 'protocol' for file sync?
jtalarico
  • 247
  • 1
  • 6
  • 11
90
votes
2 answers

Rsync creates a directory with the same name inside of destination directory

When I run this command rsync -avzp --del -e "ssh -p myport" user@hostname:/var/www/tests /var/www/tests files get synchronized but instead of saving files in /var/www/tests, Rsync creates one more directory "tests" inside of existing…
javi007
  • 903
  • 1
  • 6
  • 5
87
votes
4 answers

How to keep rsync from chown'ing transferred files?

I have an sshfs connection setup with a remote filesystem on a Linux server. I'm doing an rsync from my local server to the ftpfs-filesystem. Because of the nature of this setup, I can't chown anything on the sshfs filesystem. When I do the rsync,…
Jake Wilson
  • 8,814
  • 29
  • 97
  • 125
84
votes
11 answers

protocol version mismatch -- is your shell clean?

When following the instructions to do rsync backups given here: http://troy.jdmz.net/rsync/index.html I get the error "protocol version mismatch -- is your shell clean?" I read somewhere that I needed to silence the prompt (PS1="") and motd…
rfreytag
  • 1,195
  • 1
  • 10
  • 11
81
votes
8 answers

Is it possible to use rsync over sftp (without an ssh shell)?

Rsync over ssh, works great every time. However, trying to rsync to a host which allows only sftp logins, but not ssh logins, provides the following error: rsync -av /source ssh user@remotehost:/target/ protocol version mismatch -- is your shell…
Tom Feiner
  • 17,578
  • 8
  • 30
  • 24
80
votes
2 answers

Why is rsync skipping the main directory?

I'm trying to use rync locally (on a windows machine) to a remote server (my osx box) in order to test a remote deploy build script. I've done rsync before just fine between 2 linux servers, but I'm having problems now. Here is the output: $ rsync…
chrisan
  • 957
  • 1
  • 8
  • 12
79
votes
4 answers

How to keep the full path with rsync?

When backing up with rsync, How do I keep the full directory structure? For example, the remote server is saturn, and I want to backup saturn's /home/udi/files/pictures to a local directory named backup. I want to have (locally)…
Adam Matan
  • 13,194
  • 19
  • 55
  • 75
67
votes
3 answers

Rsync triggered Linux OOM killer on a single 50 GB file

I have a single 50 GB file on server_A, and I'm copying it to server_B. I run server_A$ rsync --partial --progress --inplace --append-verify 50GB_file root@server_B:50GB_file Server_B has 32 GB of RAM with 2 GB swap. It is mostly idle and should…
dataless
  • 833
  • 7
  • 11
61
votes
8 answers

Rsync : copying over timestamps only

Currently I have two directories A/ and B/ which are identical in every respect, with the exception of the timestamps. Therefore if I run the command : rsync --dry-run -crvv A/ B/ then all files are marked "uptodate", whereas the command : rsync…
artella
  • 1,009
  • 2
  • 10
  • 6
1
2 3
99 100