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
2answers
24 views

mv with rsync functionality

I'm trying to merge two directory trees that have many common elements but also each have elements that are only present in one of the two trees. The main issue I am having is that when mv encounters ...
1
vote
1answer
31 views

Apply given rsync exclude patterns on given directory

I have a setup where I use rsync to mirror some source directory to a (remote) destination except for some files and locations defined witch rsync exclude patterns: # Useless files - thumbs.db - *.~ ...
2
votes
1answer
19 views

rsync file copy including files that change

I have to copy files between 2 servers using rsync (the network is slow). Can mirroring/ FXP with lftp be used here? Also there will be a continuous flow of files in the source directory & the ...
-1
votes
1answer
40 views

Why doesn't rsync take advantage of the mv command when --remove-source-files is specified?

Assume I want to move a tree in the filesystem, e.g. /path/to/a a.txt b.txt to another location with rsync (3.0.9 protocol version 30), e.g. with rsync -a --remove-source-files /path/to/a/ ...
4
votes
3answers
43 views

One-way-sync a directory, but leave deleted files deleted on the destination

I want to sync a directory between two systems. To make it more interesting the syncing must only be done in one direction, i.e.: if a file is deleted in the source directory, it must also be ...
0
votes
1answer
17 views

Backing up post install; rsync breaks

I use the following command for backup, but if I do a clean install of Fedora, copy over all my backed up files, then backup again, it copies them even though they are unchanged. Why? Can I avoid ...
0
votes
1answer
6 views

How to rsync just the current folder?

I want to sync some files from a remote server to my local computer. How can I make rsync to just copy the files with a certain file extension in the directory but no subdirectories? I assumed this ...
1
vote
1answer
39 views

Which config files in /etc folder must be unique for each computer?

I am doing a restoration test of backup files on a computer. Without putting much thought into it, I did an rsync to replace all files in /etc folder with the ones in the backup. Then, I realize I ...
2
votes
2answers
25 views

How should I restore /var/cache?

I just restored my Raspberry Pi server from an rsync image. During the backup, I had excluded /var/cache/*, thinking that this would restore an empty directory. This worked, but when I rebooted, a ...
1
vote
0answers
20 views

rsync 3.1.0 is creating empty backup directories

I just noticed that there is a discrepancy between version 3.0.9 and 3.1.0 of rsync. Running the command $ rsync -a --delete --backup --backup-dir=../old source/ dest/ with version 3.1.0 gives the ...
4
votes
3answers
35 views

rsync: continue or in random order

I use rsync over tor. It works for a while, then it drops the connection. That in itself is not a big problem and I suppose it is not entirely unexpected when running long sessions over tor that takes ...
2
votes
2answers
43 views

Preserve ownership with rsync and nonexistent user

I have two computers with the same user, me@Home and me@Work. I usually kept their folders synced by bringing Work home (it's a laptop) and rsyncing over LAN. However, now I'm not bringing Work home ...
1
vote
0answers
23 views

Rsync - Corrupted MAC on input

Background I have a script on my NAS which is a Synology DS212J which is running on a special distro where uname -a gives me Linux DS212J 2.6.32.12 #4493 Wed Jul 16 11:37:16 CST 2014 armv5tel ...
3
votes
1answer
27 views

Force new permissions on files after rsync from seedbox

I have a seedbox-account which I use for torrenting. I have set up a cron job that uses rsync to download all files from the seedbox to my 14.04.1 ubuntu server. The download folder is a samba share, ...
0
votes
2answers
57 views

Big rsync — push or pull?

I'm about to start a big rsync between two servers on my LAN. Is it better for me to push the files from one server to the other or pull them (backwards)? There is not anything that would make one ...
3
votes
4answers
84 views

The most *robust* remote file copy?

How would I go about to copy files over a very unstable internet connection? Sometimes, the connection is lost, other times the IP of one machine or the other machine is changed, sometimes both, ...
1
vote
2answers
51 views

Rsync without login over port 873

We backup our production servers to an office server, to have an extra offline backup, just in case. This backup is done using rsync over port 873, and doesn't require a login like when using rsync ...
2
votes
1answer
37 views

rsync to copy files which has changed

I need to copy some files from a particular directory to a different location on a daily basis. I want to copy the changes only, so planning to use rsync. These files follows the following naming ...
3
votes
1answer
64 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
75 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
31 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
1answer
60 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
48 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
41 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 ...
1
vote
1answer
71 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
91 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
59 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
21 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
30 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
26 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
136 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
25 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
70 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
45 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
137 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. ...
2
votes
0answers
485 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
32 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
43 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
53 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
150 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
51 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
136 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
722 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
329 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
52 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
46 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
40 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
31 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
61 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
246 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 ...