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

6
votes
4answers
3k views

cp or rsync, is cp really worth it?

I hope this does not count as a question without a real answer, as I can't seem to find a good reason to use cp(1) over rsync(1) in virtually all circumstances. Should one typically favour rsync over ...
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 ...
0
votes
1answer
480 views

rsync exclude based on file size?

Is it possible to exclude files in rsync over a certain size (e.g. over 250 MB)? And what if I also want to exclude hidden files? How would I exclude all hidden files or directories (those that ...
2
votes
1answer
124 views

Rsync over Rsync via cronjob

I have a local server which Rsync's from some computers on the LAN. It's a part of a backup solution. This Rsync runs via cronjob twice a day. Occationally people add gigantic amounts of data, like a ...
2
votes
3answers
79 views

Get files on remote copy but not local

I have a folder. I have one copy of this folder locally and one on a server. I edited my local folder as I wanted and then rsync it to the server. Is there any way of comparing those two copies, ...
0
votes
2answers
56 views

Rsync after copy

Does Rsync after copy only send the differences between the folders, or does it copy the entire folder again since Rsync has never been implemented before on that folder?
0
votes
1answer
132 views

Bash scripting rsync puzzler

Frustrating. The script below work for the first two targets, but not the second. #!bin/bash ... backitup () { Todaysdate=`date "+%Y-%m-%dT%H_%M_%S"` Sourcedir=$1 Destination=$2 Username=$(echo ...
3
votes
1answer
185 views

Bash remote autocompletion : change the 'starting' directory

I'm regularly downloading files from a remote server, always from the same directory. So I wrote a custom function that I put in my bashrc: download_from_myserver () { for file in "$@" do ...
3
votes
2answers
1k views

rsync certain files, excluding the rest, ignoring .svn/ directory, recursively

I'm using rsync to copy some files from a share to another. Recursively, I need to: Delete files at destination that were removed from the origin Only sync php and js files Exclude every other file ...
4
votes
2answers
749 views

Can't share an ssh connection with rsync

In my .ssh/config file I have the following: Host xxx User yyy HostName zzzz ControlMaster auto ControlPath ~/.ssh/%r@%h:%p This works great for multiplexing my ssh connections (i.e. login once, ...
3
votes
2answers
126 views

Any ideas to simplify the awkward rsync expression below?

Here is expression: rsync -avz --progress -e "ssh -i /where/is/my/id_dsa" vivek@some.host:`ssh -i /where/is/my/id_dsa vivek@some.host "find /remote/source/dir -type f -name '*.sql' | sort -nr | head ...
2
votes
1answer
119 views

`mv` has failed because of insufficient disk space, what now?

I have tried to move a folder A from partition a to partition b as folder B with mv. Now the target file system was not big enough for all the data (I know I should have checked this first). Anyway, ...
4
votes
3answers
657 views

How can I exclude files by default with rsync?

How can I exclude files by default with rsync? Here is how my normal rsync syntax starts out: rsync --exclude ".ht*" --exclude "error_log" --exclude ".DS*" --exclude "old" ... I've seen a lot of ...
3
votes
2answers
1k views

How do I rsync only some files in some directories

I'm trying to sync all *.jpg files from /var/www/data/models/days/ + some other directories from /var/www/data root. I do: rsync -az --delete --include='/models' --include='*.jpg' --exclude='*' ...
1
vote
2answers
409 views

Cancel and resume a duplicity backup

Is there a way to cancel duplicity (running over rsync and symmetric gpg encryption) without messing up the running backup and resume it later (for example after rebooting the laptop) without ...
2
votes
1answer
134 views

ssh/scp works but rsync just constantly says “no”

Hi I have a windows 2003 server that I need to back up onto a linux client so I install cygwin on the Win2k3. On the Win2k3 I have enabled ssh, scp but (because the Win2k3 server uses an customised ...
1
vote
1answer
218 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?
18
votes
4answers
8k views

Does rsync verify files copied between two local drives?

I want to make a fresh new copy of a large number of files from one local drive to another. I've read that rsync does a checksum comparison of files when sending them to a remote machine over a ...
4
votes
2answers
221 views

Two-way rsync results in oscillating content

I am trying to sync content between two servers. The servers are identical builds (Ubuntu 12.04LTS) and have this cron job running to sync the content: rsync -arzc --update --delete ...
7
votes
3answers
2k views

Why does rsync fail to copy files from /sys in Linux?

I have a bash script which uses rsync to backup files in Archlinux. I noticed that rsync failed to copy a file from /sys, while cp worked just fine: # rsync /sys/class/net/enp3s1/address /tmp ...
1
vote
1answer
104 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, ...
0
votes
0answers
116 views

Rsync seems to back up files that haven't been opened or changed

I have started using rsync to back some data on my mac to an external HD. It works really well, but I have noticed something odd. Every time I run the command, I get a list of files that haven't been ...
3
votes
1answer
2k views

rsync: failed to set permissions on “/path/to/file.txt”: Operation not permitted (1) [duplicate]

I encountered the error when attempting to transfer source files from a remote Linux web server to a local HP dt1000i Desktop Hard Drive connected to an Ubuntu 12.10 box via USB. A Samba share is ...
1
vote
0answers
257 views

Rsync daemon intrepreting parameters as command in rsync.conf

I meshed up with my rsync on linux. When I am restating it, its showing me following error: sudo /etc/init.d/rsync restart /etc/rsyncd.conf: line 13: [ftp]: command not found /etc/rsyncd.conf: line ...
1
vote
1answer
3k views

rsync: error starting client-server protocol

I have rsyncd running on both the systems . When I am trying to check the connection it giving me following error: From host2: user@host2#rsync username@host1::share password: [password] ...
3
votes
2answers
623 views

Rsyncing files with special characters to USB FAT32

I want to copy a large number of files to a USB drive that is formatted FAT32 (and cannot be formatted anything else, unfortunately). Many of these files have names with characters such as : and ? ...
1
vote
1answer
108 views

backup / on ntfs filesystem encrypted

I was about to backup my archlinux, following this guide to my FritzBox, (which enforces a NTFS system that I mounted via samba) as I remembered, that NTFS is not capable to keep permissions and other ...
2
votes
1answer
396 views

rsync and backup and changing timezone

I back up my pictures from my camera using rsync, using: rsync -vzrtl --progress --stats --timeout=0 host destination Now I was in a different timezone when I did my first backup then I moved to a ...
1
vote
1answer
749 views

IO Error in rsync while doing everyday backup

I have a sample NAS server (QNAP TS-210), with very limited Linux on-board (although a bit reinforced with Optware/IPKG). I'm a Linux newbie. After digging through Internet I was able to write my own ...
3
votes
1answer
2k views

How to see the total progress while copying the files

We know that if we give --progress parameter to rsync it will show the progress of files copied. But issue is that is shows the progress for each single file not total or overall progress. So how to ...
11
votes
1answer
2k views

Making a progressbar with “dialog” from rsync output

I'm looking for a way to filter/redirect rsync output in a manner where it can be fed to the "dialog --gauge" command, so I can get a nice looking progressbar during file sync. Currently I have only ...
1
vote
0answers
140 views

BackupPC can't finish backup

I'm trying to backup /etc/ directory on CentOS 5.2 using BackupPC. It takes several hours and then aborted by signal ALRM. There is a partial backup created with all data from /etc But BackupPC thinks ...
6
votes
2answers
220 views

Rsync different behavior when syncing folders HDD-HDD or HDD-Ext HD

When I sync two folders between two HDDs, rsync only lists the changes made at the end. However if I sync a folder between a HDD and an external HD, while the sync is running it is listing each ...
3
votes
1answer
2k 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 ...
2
votes
1answer
464 views

rsync server and client issue

I am new to rsync server so please bear with me. I just configured an rsync server that is hosting the files I would like to replicate to a remote machine. Here is the rsyncd.conf file: max ...
9
votes
6answers
8k views

tar + rsync + untar. Any speed benefit over just rsync?

I often find myself sending folders with 10K - 100K of files to a remote machine (within the same network on-campus). I was just wondering if there are reasons to believe that, tar + rsync + ...
0
votes
2answers
144 views

How to detect particular system call called or not in a whole workflow?

EDIT No. 1 My task is mirroring , i.e., copying updated data from master server to all mirrors, by using rsync and rsh. But during rsync and rsh, I found some delay. My thinking is , the reason for ...
1
vote
2answers
1k views

Synchronizing same files with different filenames using rsync [duplicate]

I have a directory ~/music that contains all my music files and a directory /media/backup/music that I wish to synchronize with the first one using rsync. Initially, I did a rsync -a ~/music ...
0
votes
1answer
256 views

rsync is changing my directory permissions

I have an rsync setup that transfers files from my local development machine to my production web server. On the production server, the storage directory needs to be 775. When the rsync completes, it ...
19
votes
1answer
11k views

Delete extraneous files from dest dir via rsync?

Say I have SRC 001.jpg 002.jpg 001.txt a.zip DEST hello.jpg rsync -d --delete SRC:{*.jpg,*.txt} DEST It doesn't remove hello.jpg from DEST, any idea how to archive this?
3
votes
4answers
390 views

Most Efficient way to back up/sync large directories over SSH

I'm looking to back up some large directories on a Dedicated Server to another Server on a daily basis using minimal bandwidth RSync looks like its up to the task but I'm unsure of the best command ...
1
vote
0answers
190 views

Cannot get rsync to keep source file ownership, tried many tricks

I'm trying to rsync some directories from a webserver running RHEL5 to a system running Xubuntu. I have rsync, ssh, and keys setup for the machines. I've tried everything so that when i backup from ...
6
votes
1answer
378 views

rsync: skip files for which I don't have permissions

I'm using rsync -rlptD to copy a directory from another user. There are a few files (I have no way of knowing these in advance) which I don't have permission to copy. Is there a way have rsync ignore ...
2
votes
1answer
2k views

rsync all directories that start with a specific digit

I have directory loaded with thousands of sub directories: /home/tmp/ 1 12 123 1234 2345 234 3456 345 34 ...
5
votes
1answer
156 views

Can I exclude /run from my backup scheme?

I have written a rsync-based system backup for my Linux system. The aim is to be able to redeploy the system entirely from the saves, so I don't only backup homedirs. I have excluded a few top-level ...
2
votes
1answer
253 views

Unison can't synchronize Dropbox configuration (socket files)

I'm using Unison to synchronize my home across several computers, and I've addressed everything but this. The Dropbox configuration is partially skipped, and as a result Dropbox thinks there is no ...
3
votes
1answer
241 views

rsync: how to relocate absolute symlinks?

I've pored over the rsync manpage as well as on several related questions here on serverfault. I've played with -R and -L and -l options, but no luck. Here is the question: when sending a dir from ...
1
vote
1answer
463 views

rsync to SFTP while moving completed uploads to another folder

I'm going to be moving a lot of data (30GB) to a server which is split up into multiple 200MB tar.gz files. This is going to take time, and I'm going to need to stop and start my computer again during ...
3
votes
1answer
211 views

Pausing rsync via bash script?

Is there a way to pause rsync via command line, if it transfers data for over X minutes? I'm working on using it as a backup and would like it to pause every once in a while to prevent the hard disks ...
1
vote
1answer
711 views

rsync command to backup home tree to another disk

I want to make sure I am using the correct rsync command on Linux. I do not want to run an rsync and end up losing data as I am new to Linux and I have no backup now. On Linux Mint, I want to backup ...