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

2
votes
2answers
2k views

how to move (not copy) files from one server to another?

I want to move files from server1 to server2. A producer on server1 will keep generating the files, and a consumer on server2 will keep processing them. I can copy files using the following shell ...
2
votes
1answer
232 views

rsync redoing files?

I found rsync redoing files that have no modification. One file is >1gb so it takes a bit to do. My command is below. I'm running the command via ssh. The filesystem in question is a NTFS usb HDD to a ...
2
votes
1answer
5k views

How to force rsync to overwrite read-only archive files?

I'm using rsync to copy some source code. The copied code must not be modified at the destination place by my mistake while code editing. So I set --chmod=u-w flag to make it read-only after copying. ...
2
votes
2answers
225 views

Want to rsync some files after they've been sedded

I would like to rsync some HTML files to a webserver that are in production form. To get them in production form I have to trivially insert a ".production" string in a script tag. I can do this with ...
2
votes
1answer
57 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
76 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 ...
2
votes
1answer
30 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
69 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 ...
2
votes
3answers
2k 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: ...
2
votes
1answer
369 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 ...
2
votes
1answer
693 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 ...
2
votes
2answers
585 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
1k views

How to rsync to different directory?

Here is what I want to achieve: Run Rsync to compare two directories recursively like this: rsync -r /source /target but don't actually rsync between the directories. I want the resulting ...
2
votes
2answers
883 views

Backup a Windows PC to a Linux Machine

What is a good backup strategy to backup a Windows 7 box to a Ubuntu box that are on the same network? The solution I am thinking would be to mount a Windows folder to Ubutnu then use rsync. But I'm ...
2
votes
1answer
252 views

Grant permissions using rysnc

I want to use rsync (as a user) from "me" on a local computer to "another" user on a distant computer. However, I also want "another" user (on the distant computer) to own the files and to be able to ...
2
votes
1answer
144 views

problem with rsync. forgot the ending dot and can't find beackupfiles now

I am new with linux and tried to backu my files doing this: rsync -arvu /home /etc /opt /var I was in the desired directory (on an external hard-disk drive) and logged in as su. but no files where ...
2
votes
2answers
664 views

rsync via ssh from linux to windows sbs 2003 protocol mismatch

I am trying to backup my linux webserver to our local windows sbs 2003 server in the office. I have set up ssh and cwrsync on the windows server and have confirmed that the linux server can reach the ...
2
votes
1answer
26 views

How to interpret rsync console output?

I use the following rsync command to backup my files: rsync -avHc Pictures /backup/ Isn't -v supposed to only display files and directories that were transferred? If I change a file and run the ...
2
votes
1answer
33 views

Rsync folder while --exclude-from'ing .gitignore files at different depths

So I'm trying to work on a command to rsync a source folder with a structure like so: - app.js - .gitignore - src/ - src/logs/ - src/logs/.gitignore The first .gitignore would have a series of ...
2
votes
2answers
37 views

rsync with colons in filenames

I have a fairly large directory that I need to sync to an external hard drive for both backup and portability reasons. /work I try to run the following rsync command in order to copy this folder to ...
2
votes
2answers
32 views

In rsync, can I add exceptions to --delete using an external file?

I want rsync to: Copy all files from source to destination If a file does not exist anymore in the source, delete it from the destination, EXCEPT for some specific files And I need to list the ...
2
votes
1answer
69 views

rsync is deleting excluded file

I'm having trouble excluding a file from rsync. The file in question is a configuration file that is specific to the machine it's on, so I have one version on my dev machine, and another on the ...
2
votes
1answer
41 views

rsync only missing directories

Is there a way to tell rsync to sync only source directories that are missing on a destination (whole directories, not just any missing file)? Considering S as the set of source directories, and D ...
2
votes
1answer
70 views

Would this LUKS LVM rsync restore method work?

I have an Ubuntu installation using LVM and LUKS encryption. LVM and encryption were chosen during the install process). While logged into it, I backup the full live system using rsync to another ...
2
votes
1answer
56 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
32 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
89 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 ...
2
votes
3answers
593 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 ...
2
votes
2answers
256 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 ...
2
votes
1answer
266 views

Permission issues when doing system backup using rsync [duplicate]

I'm trying to backup my linux system (arch linux on a laptop) to a remote computer on the same network using ssh (or NFS). I use rsync extensively to backup my /home directory to the remote computer ...
2
votes
2answers
195 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 ...
2
votes
2answers
809 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 ...
2
votes
1answer
304 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 ...
2
votes
1answer
768 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 ...
2
votes
1answer
663 views

Rsyncing multiple files with white spaces in the names

I'm trying to back up files onto a server, but I'm having problems with files that have white spaces in the names. I'm using this command in terminal: FILES="testing/space\ in\ filename testing/and\ ...
2
votes
1answer
2k views

What is the interaction of the rsync --size-only and --sparse options?

If I use rsync with the --size-only and --sparse options together, if a file already exists at the destination as a full file (otherwise the same) it's not overwritten. If I omit the --size-only ...
2
votes
2answers
308 views

How to update a content management installation by overwriting existing files via ssh and shell?

I have installed a cms (modx) on a webserver running CentOS 5 and Apache 2.2. Now there is a new version and I would like to update it. The instructions in the modx-wiki suggest to overwrite the ...
2
votes
1answer
853 views

sbopkg is not working with proxy

Sbopkg used to work on my computer untill the network admin started to make a compulsory for the user to use proxy before connecting to the Internet. So, when I tried to sync to slackbuilds, I'm ...
2
votes
0answers
38 views

SSH Tunnel with autossh

I can't seem to find a close enough example but here it goes. I'm trying to in the end setup rsync from one server to another through an ssh tunnel. Local (my machine) will run the rsync to pull ...
2
votes
1answer
76 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
335 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
0answers
904 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 ...
2
votes
1answer
57 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 ...
2
votes
0answers
398 views

How to use rsync to backup large files by either appending or replacing

I am using rsync to backup some large files regularly: rsync --archive --update --append-verify [source] [destination] Most of the times, the files increase in size (like a log file), but sometimes ...
2
votes
1answer
41 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 ...
2
votes
0answers
228 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 ...
2
votes
3answers
2k views

Suppress server message in rsync

When I rsync or scp from a particular server I get a rather long message telling me the rules of the server. However when I setup regular pulls, I'd like to be able to suppress those messages in my ...
2
votes
3answers
976 views

Copy/backup all dirs containing files matching a regexp

I would like to do a backup where I recursively go through a dir structure and only get directories with files whose names matching a particular regexp. I would like to keep the directory structure, ...
1
vote
2answers
481 views

Synchronize the files from One folder of a Server to other

I need a script in which Files of One server will be copied to other folder of another server ONLY AND ONLY IF the file on SOURCE SERVER file doesn't exist on DESTINATION SERVER. Further Detail ...
1
vote
2answers
1k 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 ...