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
22
votes
5 answers

Execute rsync command over ssh with an ssh agent via crontab

i have a cronjob: 0 9 * * * rsync -a mydir remote_machine: i installed this with 'crontab -e'. i have an ssh-agent running, and when i execute the rsync command itself it works w/o any user interaction or password entry, but the cronjob fails with…
aaron
  • 741
  • 3
  • 10
  • 19
22
votes
4 answers

Rsync show progress for individual file

I'm using rsync to upload/download a pretty large file (20Gb). I'm aware of --progress option, but what it does in my case is just showing me the result at the end. My problem is that during some unstable connection - I don't know whether it's still…
Salmon
  • 321
  • 1
  • 2
  • 6
22
votes
1 answer

Optimizing rsync for transferring huge files quickly

This is what I need: Rsync daemon running on source server. Destination server does a rsync pull as below: rsync -ptv rsync://source_ip:document/source_path/*.abc destination_path/ Huge binary files (3 GB to 5 GB) are copied from source machine to…
Varun
  • 405
  • 2
  • 4
  • 7
21
votes
5 answers

How to rsync files / folders from a specific date forward?

I would like to rsync folders from a specific date and forward. for example. I want to rsync my folders that were created from 3 days ago (and of course 2 days ago, one day ago etc.). I know I need to use find and rsync but I'm not sure how. any…
edotan
  • 1,876
  • 13
  • 39
  • 57
21
votes
5 answers

How to speed up rsync for small files

I'm trying to transfer thousands of small files from one server to another using the following command: rsync -zr --delete /home/user/ user@10.1.1.1::backup Currently the transfer takes a long time (I haven't timed it). Is there way to make this…
Noodles
  • 1,386
  • 3
  • 18
  • 29
20
votes
4 answers

rsync --compress-level: which compression levels can be used?

Rsync has command line arguments for compression: -z, --compress compress file data during the transfer --compress-level=NUM explicitly set compression level What does --compress-level mean? Which numbers can be used as level?
cronfy
  • 691
  • 1
  • 6
  • 14
20
votes
5 answers

rsync error unexplained error (code 255) at io.c

I was using a script to perform rsync in sudo crontab. The script does a 2-way rsync (from serverA to serverB and reverse). After I reboot both the server machines, the rsync is not working in sudo crontab. I also setup a new cronjob and it fails,…
kabeer
  • 201
  • 1
  • 2
  • 3
20
votes
8 answers

How do I copy a directory tree but not the files in Linux?

I want to copy about 200 directories & subdirectories from one location to another but I don't want to copy the thousands of files within those directories. I am on Linux. Note: I don't have enough space to copy everything then delete all the files.
Kyle West
  • 636
  • 1
  • 6
  • 11
20
votes
13 answers

Complete restore of linux system

I am familiar with using rsync to back up various files from my system but what is the best way to completely restore a machine. What I have tried in the past is: Do a basic format/reinstall from the Fedora install disks Make sure networking is…
Simon Foster
  • 2,622
  • 6
  • 38
  • 55
19
votes
6 answers

Faster rsync of huge directory which was not changed

We use rsync to backup servers. Unfortunately the network to some servers is slow. It takes up to five minutes for rsync to detect, that nothing has changed in huge directories. These huge directory trees contain a lot of small files (about 80k…
guettli
  • 3,591
  • 17
  • 72
  • 123
19
votes
7 answers

Get list of transferred files from rsync?

I'm currently using rsync on a script that deploys a PHP application from a staging to a production server. Here is how: rsync -rzai --progress --stats --ignore-times --checksum /tmp/app_export/ root@app.com:/var/www/html/app/ This is currently…
Mauro
  • 386
  • 1
  • 4
  • 13
19
votes
6 answers

Rsync over ssh: "ERROR: module is read only" suddenly appeared

I've used from some time rsync/ssh to backup my shared host contents to my personal Synology NAS (212j for that matter), and it worked quite well. For information, I use a password-less ssh connection. 3 days ago, I updated my NAS software and…
user978548
  • 353
  • 2
  • 3
  • 8
19
votes
4 answers

Rsync -avzHP follows hardlinks instead of copying them as hardlinks

I use rsnapshot to create hourly/daily/weekly/monthly backups of my "work"-share. Now I'm trying to copy the whole backup-directory onto an external drive using rsync. I used this command/parameters within a screen session (yes, the…
woerndl
  • 293
  • 1
  • 2
  • 7
19
votes
3 answers

Using rsync to only delete extraneous files

What's the best way of comparing two directory structures and deleting extraneous files and directories in the target location? I have a small web photo gallery app that I'm developing. Users add & remove images using FTP. The web gallery software…
Bryan
  • 7,628
  • 15
  • 69
  • 94
19
votes
3 answers

How to perform a secure rsync between servers across an unsecured network

Basically what I'm asking is, has anyone come across a means by which to wrap rsync inside ssh. With OpenSSH v4.9+ sftp has some nice options that allow you to chroot the incoming connection and such - and that's a solution that I would look at,…
khosrow
  • 4,163
  • 3
  • 27
  • 33