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

15
votes
4answers
7k views

Resume transfer of a single file by rsync

In Ubuntu, I want to copy a big file from my hard drive to a removable drive by rsync. For some other reason, the operation cannot complete in a single run. So I am trying to figure out how to use ...
4
votes
2answers
2k views

rsync mkstemp failed Invalid argument (22) with davfs mount of Box.com cloud

I mounted Box.com cloud storage using davfs according to these instructions. I mounted my Box.com account under /home/me/Cloud/Box I can access the mounted filesystem via Dolphin as well as via the ...
2
votes
1answer
50 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/ ...
2
votes
1answer
24 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
2answers
59 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
28 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
1answer
23 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
3answers
1k views

rsync list of files in sub-directories to remote server and delete extraneous

I haven't been able to find the answer to this one. I have tried all kinds of combinations of --include, --exclude, -r, --delete-excluded, and source directory. This is what I'm trying to accomplish: ...
0
votes
2answers
42 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 ...
8
votes
2answers
848 views

What keeps one side of an rsync so busy?

I've got a Debian machine on my LAN serving as a backup server for the others. It has four HDDs combined into a software RAID 5 md device, on that an LVM, and on that btrfs. Backups are made using ...
1
vote
1answer
127 views

Why does rsync look for DSA instead of RSA key when run from cron job?

I want to backup files from a server to my local computer using rsync. I can only log-in to the server with an RSA ssh key. I have stored the passphrase to the key in Seahorse Passwords and Keys, ...
4
votes
1answer
715 views

Using setfacl to create recursive permissions for Apache with rsync

I have a Dokuwiki installation locally, which I regularly sync to my server with rsync. I'm also going to give a friend of mine an ssh account, and host his public Dokuwiki installation. However, I'm ...
3
votes
2answers
955 views

rsync pattern copy: dotfiles

I followed the advice given in the question Rsync filter: copying one pattern only to setup a command line I need to backup only the dotfiles .inF* Yet with the command: rsync -av --include='.inF*' ...
1
vote
1answer
54 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
40 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
45 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 ...
3
votes
2answers
2k views

How to use rsync to backup a directory without git subdirectory

I want to copy my c directory with all subdirectories excluding ./git subdirectory. I do it using rsync : echo "copy c and sh files " rsync -a --include='*.c' --include='*.sh' --include='*/' ...
10
votes
4answers
5k views

rsync all files of remote machine over SSH without root user?

I have this command to backup a remote machine. The problem is that I need root rights to read and copy all files. I have no root user enabled for security reasons and use sudo the Ubuntu way. Would I ...
3
votes
3answers
234 views

How to rsync over ssh when directory names have spaces

I am new to Linux and am trying to rsync from one server to another. The servers have the same directory structure but I am having trouble getting the remotes server to properly recognize the path ...
2
votes
1answer
25 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
57 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. ...
2
votes
1answer
107 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. ...
3
votes
1answer
52 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
38 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 ...
1
vote
1answer
110 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 ...
1
vote
0answers
298 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
28 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
5k views

force rsync to overwrite files at destination even if they're newer

I have an rsync backup script I run, which also restores files back where they came from when I ask. But if the files at the destination are newer than those in the backup when I try to restore, it ...
4
votes
2answers
166 views

Is there a way to put comments in an rsync --files-from file?

I have a file that rsync uses as --files-from: dir1 dir2 dir3 I want to be able to put comments above each dir entry like that: # my dir1 comment dir1 #dir2 comment dir2 #yet another comment ...
5
votes
4answers
119 views

Rsync that handles moves sensibly

I've been successfully using rsync to synchronize my home directories between my laptop and my netbook (both using ext4 with Linux). My only problem with it is that every now and then I like to ...
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 ...
12
votes
1answer
389 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/ ...
17
votes
3answers
16k views

How can I pause/resume rsync

How can I pause an rsync that's running? First time I did Ctrl+C to kill it and used the -P flag to run again. Is this prone to corrupt the current file transfer? Second time I simply put MacOS to ...
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 ...
0
votes
1answer
47 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 ...
1
vote
1answer
106 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 ...
1
vote
1answer
367 views

Getting back rsync's deleted files [duplicate]

I accidentally rsync-ed to a server using the delete attribute when I shouldn't have. Is there any chance of getting the data on the server that rsync removed.. back?
2
votes
1answer
117 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: ...
6
votes
4answers
3k views

rsync, delete files on receiving side that were deleted on sending side. (But don't delete everything)

I'd like to use rsync to... delete files on the receiving side that were also deleted on the sending side not delete other files that are in the rsynced directory on the receiving side For ...
2
votes
2answers
366 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, ...
3
votes
1answer
3k views

Having an rsync job complete after closing SSH connection

I am transferring a large amount of files from one computer to another using rsync. I am doing this by SSHing into the source computer and executing a command like this: sudo rsync ssh ...
1
vote
1answer
205 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 ...
7
votes
2answers
9k views

“rsync: failed to set permissions on …” error with rsync -a or -p option

When I use the -a option as is asked and answered in Preserve the permissions with rsync, I got a lot of "rsync: failed to set permissions on" errors. rsync: failed to set permissions on ...
4
votes
1answer
51 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 ...
1
vote
2answers
662 views

How to use `~/.ssh/config` setting for each server by `rsync`

I'm now using rsync with -e 'ssh -p 10022' option to specify the port. I have already ssh setting in ~/.ssh/config. Host myvps HostName example.com User ironsand Port 10022 Can I use this ...