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

1568 questions
352
votes
19 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,239
  • 17
  • 51
  • 64
328
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
  • 30,211
  • 62
  • 184
  • 246
249
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,637
  • 2
  • 15
  • 6
207
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,273
  • 3
  • 16
  • 13
128
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,547
  • 2
  • 12
  • 14
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
94
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,132
  • 6
  • 23
  • 39
83
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
  • 833
  • 1
  • 6
  • 5
83
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,494
  • 29
  • 94
  • 121
80
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,115
  • 1
  • 10
  • 11
77
votes
3 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
  • 12,504
  • 19
  • 54
  • 73
75
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
  • 907
  • 1
  • 8
  • 12
75
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
  • 16,758
  • 8
  • 29
  • 24
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
60
votes
18 answers

Favorite rsync tips and tricks

The more I use rsync the more I realise that it's a swiss army knife of file transfer. There are so many options. I recently found out that you can go --remove-source-files and it'll delete a file from the source when it's been copied, which makes…
Amandasaurus
  • 30,211
  • 62
  • 184
  • 246
1
2 3
99 100