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
3answers
617 views

Rsync problem with cron and no problem manually

I have a backup.sh file that launch an rsync command. This rsync is to backup my dedicated server on a RaspberryPi running raspbian. (I use keychain so I don't need to type any password etc ...) The ...
3
votes
3answers
369 views

How to avoid unnecessary deletion and recopying of moved folders when using rsync? [duplicate]

I've read that rsync cannot detect moved folders, and simply delete and recopy them into the new folder structure. Since the only change I did to my master copy is the simple introduction of a top ...
4
votes
1answer
1k 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 ...
0
votes
1answer
202 views

Get a clean list of files transferred from rsync

I'm trying to get an itemized list of files transferred by rsync. Using the -i and --out-format options, I'm instead ending up with output that looks like this: 3HMP1MO_001.tif 974.68K 100% ...
13
votes
5answers
8k 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 ...
1
vote
0answers
54 views

looking for name of a userspace tool for disk/network caching? [closed]

I remember seeing a blog post a month back that used a tool in the command which acted like a user space caching tool to buffer/cache reads and writes in RAM to overcome disk or network contention. I ...
4
votes
2answers
6k views

rsync is very slow (factor 8 to 10) compared to cp on copying files from nfs-share to local dir

I have a freshly installed ubuntu-server which is ought to be the new backup-server for our VM-storage. The server has 4 nics, 2 of them 10Gbit (in fact an intel x540-T2 with the newest driver ...
3
votes
1answer
932 views

sudo askpass: ask from other tty

Context I want to setup rsync backups of my server, so I run the following command rsync -r -e ssh --rsync-path="sudo rsync" rsyncuser@example.com:/ /backup/ Ideally, that command would ask my ...
14
votes
4answers
968 views

Why not always use rsync?

I wanted to ask is there any reason not to use rsync for everything and abandon cp? I wasn't aware of rsync and now I don't know why cp is ever needed.
8
votes
1answer
1k views

Is using rsync while source is being updated safe?

Is it safe to use rsync when the source filesystem is mounted and writeable, assuming that it may very well be modified while rsync is running? I presume that under race conditions I may not get the ...
2
votes
2answers
492 views

How can I add an array of arguments inside my rsync call inside a script?

I want to copy a folder to another location, while excluding some specific files Here is my current script: #!/bin/bash if [ -n "$2" ] then source=$(readlink -f $1) destination=$(readlink ...
2
votes
1answer
40 views

Can I set defaults for rsync in non daemon mode?

Can I set defaults for rsync in non daemon mode? I know the daemon mode has this configuration file: /etc/rsyncd.conf But I typically use the non daemon version in this sort of manner: rsync -avzcO ...
1
vote
1answer
77 views

Finding out whether rsync modified target?

My program copies/synchronizes several directories from source to target, each using rsync. For each directory, if the version in target is not identical to source, and thus rsync modifies the target, ...
1
vote
2answers
44 views

Reverse rysnc with multiple sources

I'm working on some backup script right now. To speed the process up I used rsync with all folders to be backed up. (Something like this: rysnc -a --delete --progress $folder1 $folder2 $folder3 ...
0
votes
1answer
757 views

Rsync from multiple folders to one

Is it safe to have multiple folders Rsync simultaneously into one? Each of the source folders contains a subset of the destination folder, and everybody just syncs into a master destination folder. I ...
1
vote
0answers
14 views

Combining rsync --files-from with --delete [duplicate]

I'm doing rsync --files-from=find-output.txt ~/backup/ (simplified). I'm trying to add --delete, to make rsync delete files in backup that are not included in the file list, but it does not delete ...
1
vote
2answers
197 views

Delete files that exist in the source with rsync

I have a folder on server "A" called ./delete. I want to delete everything in the folder ./stuff on server "B" that exists in the ./delete folder on server "A". Its like the reverse of rsync. ...
1
vote
1answer
170 views

Remote PC accessible by ssh, scp/rsync not working (anymore) [closed]

I've got a remote machine running Ubuntu 12.04 LTS. I've used it lots of times to log in to via ssh and to copy files to via scp and rsync. Today I was able to log in via ssh, but I'm not able to ...
3
votes
1answer
751 views

find and rysnc?

I want to be able to search for files over 14 days and over 10k and than rsync those found files to a destination. Is there a way to combine these two commands? find ./ -mtime +14 -size +10k rsync ...
3
votes
1answer
2k views

suppress rsync warning: some files vanished before they could be transferred

I get loads of warnings when backing up my running Postfix and Courier server files like: file has vanished: /var/kunden/mail/username/name@mymail.de/tmp/courier.lock How do I suppress those ...
2
votes
2answers
110 views

Do files not copied matter when using rsync?

I have used rsync to back up my / directory to an external hard drive, using this command in user (not su) mode (about 200,000 files copied in one hour and forty minutes) and it seemed to finish ...
1
vote
1answer
866 views

Why rsync attempts to copy file that is already up-to-date?

I have two same files, on local machine and on remote one. Their sizes are equal, and file on local machine is newer than on remote one - but rsync still attempts to copy the file. I invoke rsync as ...
1
vote
2answers
82 views

Rsync and take name/path changes into account [duplicate]

I maintain a large folder, and this folder is regularly rsync'ed to another folder far away. Sometimes I change a name on my local folder, and then the next time I rsync to the remote folder the ...
0
votes
1answer
108 views

rsnapshot LVM without root

I'd like to cron a local backup to a locally mounted USB drive. I'm using rsnapshot and want it to back up an LVM snapshot onto the USB drive. But, unless I run the cron as root it complains that I ...
4
votes
1answer
69 views

Edge cases in filesystem operations during backup and file copy

I have a question about file access in Linux that I cannot sum it up completely. Consider that I have a home directory that I backup it using rsync triggered via cron. My home directory is on an EXT4 ...
2
votes
2answers
169 views

How do I only copy files to a destination that exist in the folder from the source, everything else should not be copied

How can I copy files from source to destination, where in all the files existing in destination (with directory structure), only should be copied from the source, overwritten in the destination. Rest ...
0
votes
0answers
2k views

Occasional rsync error code 12 “Connection reset by peer (104)” from cron task that runs every 20 minutes

I have a script run by cron that rsync's various folders to a server in a different city to publish files to websites. In case it matters, the source server is within the corporate firewall and the ...
1
vote
1answer
398 views

why isn't rsync copying files to the server

I'm following along with a Railscast that teaches how to set up Chef solo. It uses two interesting terminal commands that I had never seen before, only one of which I can get to work. When I do scp ...
0
votes
1answer
545 views

rsync “Permission denied” despite ownership

I just rsync'd a bunch of files, from a Windows box running cygwin sshd, to a CentOS 6.4 box. I ran rsync -e sshd... on CentOS to do this. Then I plugged in a USB drive on the CentOS box, formatted ...
3
votes
4answers
1k views

rsync over ssh tunnel

---------- /| /| ------------ | Home | | | | | | Work | | |--------| |---------------------| ...
3
votes
2answers
2k views

rsync exclude directory not working

I am running Fedora 17 64-bit and the rsync --exclude=/home/ben/<dir> is not working as expected. I am trying to rsync my home directory to a thumb drive, but I want to exclude certainly ...
1
vote
2answers
150 views

mlbackup / rsync / hard links data size

I am new to mlbackup/rsync and the concept of hard links, so I am a little confused after creating a backup data set via mlbackup. So here's the scenario: I am backing up "folder A" to "folder B". ...
1
vote
3answers
736 views

rsync: samba vs ftp for backup

I need to back up ~0.5 TB of files (about 600,000 of them) from a Windows Server 2003 machine to a CentOS 6.4 machine across a 100MB network, and update them once a night. The backup script would be ...
1
vote
1answer
117 views

Rsync is skipping encrypted (but mounted) home directory

I have two user-home-directories in /home/, /home/user1 and /home/user2, whereas user1 is encrypted (using ecryptfs) and user2 is not. If I use rsync like this (invoked as user1 which is a sudo user) ...
1
vote
2answers
196 views

Is there a way to prevent emerge --sync from deleting files from the portage tree?

Although PORTAGE_RSYNC_OPTS, a make.conf option, allows one to change the rsync options but removing --delete from it causes emerge to fail. I think with it remarking about missing md5-cache entries ...
2
votes
1answer
879 views

rsync failing to choose the correct target directory

I'm trying to write a short shell script which also handles copying a file called webcam.jpg into a date coded subdirectory. I'm using rsync for this as it automatically creates a directory if it ...
1
vote
1answer
69 views

Non-persistent differencing file

I have a large file (5-10 GB) and want to access this file in a special file system with the following conditions/features: There is a single process that reads and write on the file. When the ...
0
votes
1answer
632 views

rsync remote to local automatic backup

Because all my work is stored on a remote server I would like to auto backup my server monthly and weekly. My server is running Centos 5.5 and while searching the web I'm found a tool named rsync. I ...
1
vote
3answers
386 views

rsync only subdirectories and content

I have a directory that contains a number of files and subdirectories. See below: baseDir bad1 bad2 subDir1 file1 subDir2 file1 I would like to rsync the contents of baseDir without ...
3
votes
1answer
227 views

How do I backup a non-empty directory and preserve metadata like permissions/user-group ownership/time file was modified?

I used rsync for creating a backup copy: bash-3.2$ rsync -tvrog /export/home/kent/Scripts /export/home/kent/TEST_Scripts_rsync With these options: Options: -v, --verbose ...
1
vote
1answer
8k 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 ...
8
votes
2answers
1k views

Why does my rsync not allow block-size>128K?

Running rsync with a large* --block-size like this: rsync -avvz --rsh 'ssh -c arcfour' --block-size 1048576 --inplace --progress example.com:/big.file /big.file I get the following error: Invalid ...
0
votes
2answers
223 views

How to setup a rsync server and client?

I have worked on rsync for the whole afternoon. I have set a rsync server,but I don't know how to use it. I have two machines:66 and 12. 66 is the server,I want to back 66's data to 12,so I use ...
4
votes
2answers
3k 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
834 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 ...
4
votes
1answer
7k views

Move files and delete directories with rsync?

Recently I needed to delete a large number of files (over 1 million) and I read that doing: rsync -av --delete `mktemp -d`/ ~/source && rmdir ~/source Was one of the most optimized ways to ...
2
votes
1answer
178 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 ...
0
votes
2answers
64 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
192 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 ...
6
votes
4answers
5k 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 ...