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

1
vote
1answer
218 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
10k 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
673 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 ...
3
votes
2answers
43 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
27 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
57 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 ...
5
votes
3answers
2k views

How do you compare two folders and copy the difference to a third folder?

You've got three folders: folder current, which contains your current files folder old, which contains an older version of the same files folder difference, which is just an empty folder How do ...
1
vote
1answer
183 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 ...
4
votes
1answer
70 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 ...
2
votes
3answers
314 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 ...
1
vote
1answer
260 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 ...
6
votes
1answer
376 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. ...
1
vote
1answer
208 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 ...
2
votes
1answer
51 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 ...
6
votes
2answers
394 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 ...
1
vote
2answers
183 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 ...
0
votes
1answer
895 views

What is the effect of rsync --block-size on large files?

I want to backup a few terabytes of large files (500mb to 1500mb each) to a backup server (BULK storage) via rsync. For this I use the following command (updated with suggestions from @Gilles): ...
0
votes
2answers
157 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 ...
1
vote
1answer
1k views

Logging only transferred files with rsync

I've created a backup script with rsync and I have it running every 10 minutes. I have it logging using --progress but to make reading the log easier I only want to include files that are transferred. ...
3
votes
2answers
108 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
87 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 ...
0
votes
2answers
102 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 ...
2
votes
2answers
611 views

Rsync --bwlimit not working

I am currently using rsync to transfert large file from a host to another. I would like to limit the debit for this transfert. After reading the man page I found the option --bwlimit which is ...
1
vote
2answers
91 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 ...
2
votes
3answers
446 views

Rsync over SSH with authorized keys..but run 2 rsync commands

I just figured out how to automate my rsync backups using authorized_keys and the command= parameter so that my rsync script can't be modified by the user. So my authorized key file looks like this: ...
3
votes
1answer
237 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 ...
2
votes
1answer
50 views

Is monitoring rsync with a pts device possible?

I have a rsync backup script, and I was wondering about methods of monitoring it as it runs. I could have it save a log and use watch and tail, but I had a more elegant solution in mind that might be ...
5
votes
2answers
1k 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 ...
0
votes
0answers
455 views

rsync multiple files to multiple directories

I need to move a large number of files that need to go to different directories i.e. file1.mpg to /mnt/s3/directory1/file1.mpg file2.mpg to /mnt/s3/directorya/file2.mpg file3.mpg to ...
2
votes
1answer
184 views

Analyse the performance of an rsync command from FreeNAS to a USB drive

I infrequently run a task where I rsync my photos (~30 directories with 10-100 files in each) from my FreeNAS machine to an external USB hard drive (500GB WD) as a redundant backup. I execute the ...
1
vote
1answer
139 views

Track down process that has notty

I have a Linux server (Red Hat 2.6 kernel) which had a spike in load due to an Rsync process which seems to have forked many times, but the process was run by rsyncuser@notty I didnt see any cron job ...
0
votes
0answers
23 views

How to allow user to only rsync/download only one directory through SSH [duplicate]

What I want to do is to give to user a simple script to run, that will sync some directory from my VPS to their machine, authentication would be done by using pubkey, and I would like to have control ...
6
votes
2answers
11k views

Using rsync to move (not copy) files between directories?

I have been using rsync to copy files for some time. My understanding is that rsync is faster than cp when some of the files to transfer are already in the destination directory, transferring only the ...
0
votes
1answer
52 views

Find total file size of a disk

I have a corrupted NTFS volume. I ran rsync to copy everything from it, which reported a total # bytes transferred at the end. What's another tool I can use to verify the total # bytes on the disk ...
0
votes
1answer
993 views

Rsync Error 23: Can I tell which files were not transfered?

I ran sudo rsync -va --progress from the root of one ext. drive to a folder on another ext. drive. The reason is that the source drive has an error-ful NTFS and I don't have access to a Windows PC to ...
1
vote
2answers
115 views

Uncompress files when rsync'in

I have 22,000 gzip files on a remote server, which I would like to trasnfer to my machine. I would also like to uncompress these files before/while transferring. Is it possible? My rsync command ...
-1
votes
2answers
63 views

rsync options to include only simple files

We intend to use a cron task to rsync files from one machine to another. Requirements are simple: File source is exactly one directory, and destination is one directory on the target machine Must ...
2
votes
2answers
132 views

rsync on a very large directory

I'm trying to rsync a partial clone of mavencentral using rsync. The problem is, due to ridiculous network policies, I can only have the copy running during business hours. The process will be cut ...
0
votes
0answers
122 views

Why I can't pass ip to rsync script?

I am writing script were rsync should be called and ask for password. However I cannot pass IP as argument. I think I am missing something simple. Any ideas? Even trivial script like this just outputs ...
0
votes
0answers
41 views

rsync include-from exlcude-from with including subdir but excluding dirs above

I try to use rsync with --include-from and --exclude-from options. I have a directory structure like: /docs/domain-[a-z]/templates Now I want to sync templates only if something is in there. Further ...
0
votes
0answers
420 views

rsync error: error in rsync protocol data stream (code 12) at token.c(288)

When I attempt rsync from one server to another server, I get this error: [root@192.168.2.22 ~]# rsync -avzp -e ssh root@192.168.2.77:/system/data /system/data/ deflate on token returned 0 (88936 ...
0
votes
1answer
74 views

How to backup all my data?

I need to backup all my data from a server (in 10 minutes), preferably keeping the symlinks. Any suggestions?
4
votes
1answer
1k views

Do any Linux distributions have a folder sync option (like briefcase in windows)?

I want to keep my local folder synchronized with a network folder. Is there any folder synchronization utility or feature in Linux?
2
votes
2answers
4k views

rsync without prompt for password

I need to execute rsync, without it prompting me for password. I've seen in rsync manpage that it doesn't allow specifying the password as command line argument. But I noticed that it allows ...
2
votes
3answers
541 views

Alternative to diff with progress for massive directory compare?

I just rsync-ed 2,000,000 files (3TB) from one RAID to another. I want to make sure my data is intact. rsync -c takes a really long time. diff doesn't show me what it's doing. Is there an ...
4
votes
3answers
363 views

Help Shell script to pass variables to rsync

I'm trying to create a simple wrapper shell script for rsync. When I send file names to my script, rsync can never seem to identify the correct location. The file names have spaces in them. I've tried ...
2
votes
1answer
258 views

How to properly setup web server directory permissions

I'm lost with this, hopefully I can find some help here: I have Ubuntu 12.04 LTS webserver. For example I have user "myuser". There is a public directory which is my web root. I chowned it and all ...