rsync is a tool to efficiently copy directory hierarchies, locally or remotely, with powerful filters to decide what gets copied.

learn more… | top users | synonyms

3
votes
1answer
22 views

How do I enable rsync in libcurl?

I'm on Arch. When pacman tries to download a package from an ftp server, It fails with the error message Protocol rsync not supported or disabled in libcurl This has been bugging me for a little ...
3
votes
2answers
57 views

transfer a file to remote dir only if doesn't exist without replacing

I'm using CentOS linux. In one line cmd, that returns 0 if success, non-0 if failure, I need: Transfer a file to a remote server. Don't transfer the file if filename exists in remote server ...
3
votes
1answer
22 views

rsync archive mode

I have been reading plenty of articles regarding rsync and its -a switch. As per theory, I have understood that it preserves a lot of properties like permission, time, group, owner, etc., but why ...
2
votes
0answers
43 views

rsync specific directories

Below are the directories of my directory structure. I only want to run rsync on the content under the archive directory of any subdirectory and exclude everything else: ./ ap/ ap/aploader/ ...
0
votes
2answers
41 views

Getting rsync failures randomly

I am getting the following rsync errors randomly from my capistrano scripts. rsync: stat "/app/test-0.1-SNAPSHOT.jar.SB4uq7" failed: No such file or directory (2) rsync: rename ...
2
votes
2answers
38 views

how to filteri by asterisk or similar expression by rsync in zsh

I have a lot of files named like: /var/log/foo/2014-07-06-01.log ... /var/log/foo/2014-07-20-04.log Everyday I have several log files and I want to download specified day's log files: $ rsync ...
-2
votes
0answers
11 views

Need to copy folder recursively from source to destination and not overwrite subfolders in destination not present in source [duplicate]

I need to automate copying folders from source to destination. However, my destination folder can have one incremental subfolder, which should not be touched. How do I automate copying folders using ...
1
vote
1answer
51 views

backup process taking prolonged time due to rsync no space left on device error

I am trying to understand why the backup process in one of the servers is taking so long and not copying the data correctly. This is the size of the external HDD partition. df -h /dev/sdb1 ...
0
votes
2answers
37 views

How to perform a dry-run using rsync over ssh?

I got these errors while trying to perform a dry-run with option -n over ssh on a remote server: # rsync --progress --delete -avhHen ssh /etc/yum root@my.ipaddress:/etc rsync: Failed to exec n: No ...
1
vote
1answer
42 views

rsync --delete deleted most files in the destination directory, why?

I got my config files in /etc folder all messed up because I did not take care of shell expansion while doing rsync: rsync --progress --delete -avhHe ssh ...
1
vote
0answers
20 views

Delete files that are not included with `rsync --files-from`

I copy files to another location using rsync with the option --files-from. Sometimes, a file gets deleted and is not included in that list of files any more. I tried to use --delete, but that would ...
2
votes
1answer
23 views

Rsync large dir, bigger than destination, need to stop and start

I have an Ubuntu server with 4TB storage. Most of it is taken up by one dir. I was told the dir was about 1.5TB, so I attached a 2TB drive on USB, and started a rsync -arW inn tmux to copy it over. ...
2
votes
1answer
21 views

Can rsync store wildcard names (perhaps using a variable)?

I'm copying files from one machine to another. Machine A has files in: /usr/a/foo/* /usr/b/foo/* /usr/c/foo/* /usr/d/foo/* Machine B wants these files in: /foo-1.2.3/usr/a/* /foo-1.2.3/usr/b/* ...
2
votes
1answer
47 views

rsync mkstemp failed: Invalid argument (22) with USB flash drive

I use "Back In Time" which is nothing more than a front end GUI to rsync version 3.0.9 protocol version 30. I'm running ubuntu 12.04. My backup device is a locally mounted USB flash stick/drive ...
2
votes
1answer
24 views

skipping copying contents of sub directories using rsync

rsync -avzm -e ssh /path/to/src/folder/ /path/to/dest/folder --include=*/ --include=*/config.xml --exclude=* I need to copy files(say config.xml) that are in the 2nd level directories using rsync. ...
3
votes
1answer
51 views

how to use rsync (using password-less ssh), with sudo just on the local side?

This command works fine for me with password-less ssh: rsync -aqve ssh ${user}@${remote_host}:/etc/bind /tmp/etc/bind Since I would like to rsync directly to my own local /etc/bind with root ...
3
votes
1answer
37 views

rsync'ing multiple {src,dest} pairs

I have a remote server on which I am deploying code. I am currently using scp to upload code, but scp is very slow and I'd like to switch to rsync (or something else which is more efficient). The ...
2
votes
1answer
103 views

Incremental file back up by date

Is there any backup tool that supports partial back up by date? What I mean is that I have some small drives such as on a laptop that can't hold a full copy of all the files on an external 2TB drive. ...
1
vote
0answers
266 views

How to use rsync with GNU parallel?

I am using scp to copy the files in parallel using GNU parallel with my below shell script and it is working fine. I am not sure how can I use rsync in place of scp in my below shell script. I am ...
0
votes
0answers
25 views

Use Rsync with HTTP

Is it possible to use rsync with an HTML POST request? If so what would the rsync command look like? For example let's say using HTML5 I have this (bear with me going back to linux stuff): <form ...
1
vote
1answer
41 views

Create a deb package from difference between two images

I am maintaining an Ubuntu server image as a development environment with several deployments. If my base image changes - install a package, modify conf files, etc - I am manually patching the new ...
1
vote
1answer
49 views

rsync parallel vs serial transmissions

Using Bash 4 and rsync on RHEL 6, are there any differences between the following methods? If so, which is more efficient, and what are the differences between these 3 methods: 1) rsync -avz ...
1
vote
1answer
97 views

Copy directory, but fail if file already exists at destination

cp -a foo/* bar/ will copy the contents of foo into bar, replacing any files that already exist. I can use the -n flag to make cp not overwrite existing files or -i to make it ask interactively ...
0
votes
1answer
46 views

How use `rsync -R` with multiple subdirs or install -D with multiple files?

Is possible with rsync to copy multiple files from a source directory to a dest directory with multiple subdirectories that don't exist? Or use install -D with multiples files to a directory that ...
2
votes
1answer
115 views

No password prompt when using rsync remotely?

I have a bash script that executes rsync transfers to a remote location, and every time I execute the script I get asked for a password. Is there a way to avoid this? This is the command I use: ...
2
votes
2answers
318 views

Specify identity file (id_rsa) with rsync

I need to make periodic backups of a directory on a remote server which is a virtual machine hosted by a research organisation. They mandate that access to VMs is through ssh keys, which is all good, ...
1
vote
1answer
194 views

Repairing CentOS 6.5 permissions after file migration

I'm running CentOS 6.5 in a VirtualBox VM. Recently, I ran out of space for my virtual hard disk. To remedy this, I decided to create a second hard disk for the /usr directory. I mounted that and ...
4
votes
1answer
50 views

Use rsync to just get a folder and its content with a pattern

I've looked all around the internet, looked in regexp sites and everything else, but I'm unable to write a rsync command to fetch what I want to. I need to mirror the FreeBSD release, but I don't ...
3
votes
2answers
41 views

How to configure Unison for real peer-to-peer?

I have a handful of devices, and am considering keeping them in sync with Unison. The devices are not running all the time, they are switched off a few hours per day, not necessarily at the same ...
4
votes
1answer
39 views

Different rsync behavior for identical directory name

I want to synchronize 2 codebases. The below command is working great, except that it doesn't account for one use case that I have with 2 directories named test in different locations: /test/ ...
0
votes
1answer
24 views

Troubleshooting Anacron

As a newbie, I'm running into a few problems in using Anacron. The code I'm using was adapted from a website in the Linux Gazette and I've already had to make a couple of changes for my code to even ...
2
votes
1answer
55 views

Rsync specific pattern, but exclude other files in same path

There are lots of files in /dapp/parsD/parsapp/object. I only want to rsync the files in this directory that match *.sql, *.pl and *.sh, but I also want to exclude 2 specific patterns in the same ...
1
vote
1answer
155 views

s3cmd: how to use exclude-from with a file list of excluded directories

I cannot seem to get the --exclude-from= option to work with my exclude GLOB file when synchronizing with my s3 bucket. Here is a trivial example to demonstrate: I create the following file tree ...
1
vote
1answer
23 views

rsync from Mac ext hd to VPS works but not VPS to Mac

There are no errors with either rsync -a /Volumes/hd/dir_foo foo@foo.com:~/ or rsync -a foo@foo.com:~/dir_foo /Volumes/hd/dir_foo in the first instance the synced folder on remote system CentOs ...
1
vote
1answer
105 views

Caching write changes on SSD to avoid HDD spin-up? ZFS, but (probably) not L2ARC

I have a home server, which - between other things - stores my documents, mail archives etc.. It uses a ZFS RAIDZ, based on spinning hdds. The server also runs an off-line IMAP service, synchronizing ...
4
votes
1answer
69 views

“hard-linking” parts of a big file in which only a small part has changed

I use rsync to make backups: rsync -a --link-dest=PATHTO/$PREVIOUSBACKUP $SOURCE $CURRENTBACKUP This way I save space due to using hard links. The problem appears when I need to backup a huge file ...
1
vote
1answer
226 views

Not able to copy multiple files using rsync 3.0.9 version?

I am trying to copy two files using rsync from a machineB but somehow it always copies only one file but not the second file - Here is the syntax I am using - rsync -avz ...
2
votes
3answers
300 views

How to use rsync or scp to efficiently copy the files from machineB and machineC to machineA?

I am running my shell script on machineA which copies the files from machineB and machineC to machineA. If the file is not there in machineB, then it should be there in machineC for sure. So I will ...
2
votes
1answer
49 views

Rsync auto detect directories with small files and compress them together for transfer

I need to transfer some files via rsync and can´t tar them before. So I thought maybe there is a mode which checks the folders content and if it is thousand of small files inside compress that folder ...
1
vote
1answer
182 views

Configuring anonymous rsync daemon

EDIT: I have since found that by using a folder in the root directory, things get a bit further - I can list the subfiles. So it really looks like permissions on the folder are the issue. I'm not ...
1
vote
2answers
144 views

rsync and SMB share

If I'm performing an rsync copy operation on a file that is on an SMB (Samba) share, is the file actually being pulled down from the network onto my client, pieces at a time, and then copied back onto ...
6
votes
2answers
359 views

How can I speed up operations on sparse files with tar, gzip, rsync?

I have a sparse file. (du -h reports 3G and du -h --apparent-size reports 100G.) So far, so good. Now, when I want to compress the file using tar or send it over the network using rsync, it will ...
12
votes
1answer
388 views

What happens when you rsync without a destination?

To make the story short, I did an rsync: rsync -avP root@exampleserver.com:/tmp/ And I forgot to put in my source directory... :( I really meant to run: rsync -avP /tmp/ ...
3
votes
2answers
104 views

Rsync won't Give Up Writing to an Unmounted Remote Drive

I've been having issues with a external hard drive staying mounted to a mount point. That's not the topic of this question, but background info. The issue is with rsync. It doesn't seem to recognize ...
2
votes
2answers
80 views

Basic rsync command for bit-identical copies

As far as I undstand, the following command: sudo rsync --delete -azvr /home/oshiro/Desktop/source/ /home/oshiro/Desktop/destination Is this all I need to create a simple synchronisation of files ...
6
votes
1answer
346 views

preserving extended attributes with cp/rsync

When copying with cp, the extended attributes are not preserved, even with explicit cp -a --preserve=all /source /dest or cp -a --preserve=xattr /source /dest The same is with rsync, i.e. ...
0
votes
2answers
98 views

Help with using rsync or cpio to do an incremental backup [duplicate]

I'm trying to do an incremental backup of all files on my NAS box that where modified in the last 24 hours (or so, can be more flexible). I'm using PuTTY to connect through SSH to a ReadyNAS 102 ...
1
vote
2answers
90 views

How can i keep the mtime of files and directories in bash when I use rsync or cp? For use in Backup/Incremental Backup

I have a new NAS box and after looking through numerous backup solutions I've found doing it manually through PuTTy to work the best. After logging in to the box through PuTTy as root, I first need ...
3
votes
1answer
219 views

Best way to sync files - copy only EXISTING files and only if NEWER than target

I'm doing this sync locally on Ubuntu 12.04. The files are generally small text files (code). I want to copy (preserving mtime stamp) from source directory to target but I only want to copy if the ...
5
votes
2answers
986 views

How to copy directory structure without removing symlinks?

I need to "install" a bunch of files to another directory keeping the directory structure of the source files intact. For example, if I have ./foo/bar/baz.txt going to /var/www/localhost/webroot/ I ...