rsync

What can du see that rsync can't?

I want to copy an entire linux server that is going to be decommissioned over the network so we are sure nothing is lost. I did du / and was told there are 60 GB of under / Then I did rsync -r / root@newserver:/old-server and when doing du in the old-server dir I got 22 GB. So why is that difference? Is there something that du can see...

Rsync module path needs to be a home directory

I'm trying to use rsync to backup windows servers to an rsync server. I'm having problems with rsync on the linux side though, it doesn't like symlinks. Currently I'm trying to use the module path of ~/backup, but rsync says that the chroot failed. I looked up what to do and saw that I needed to add the option use chroot = no and munge ...

How does rsync behave for concurrent file access?

I'm using rsync to run backups of my machine twice a day and the ten to fifteen minutes when it searches my files for modifications, slowing down everything considerably, start getting on my nerves. Now I'd like to use the inotify interface of my kernel (I'm running Linux) to write a small background app that collects notifications abou...

rsync error: failed to set times on "foo.txt": Operation not permitted

I'm getting a confusing error from rsync and the initial things I'm finding from web searches (as well as all the usual chmod'ing) are not solving it: rsync: failed to set times on "/foo/bar": Operation not permitted (1) rsync error: some files could not be transferred (code 23) at /SourceCache/rsync/rsync-35.2/rsync/main.c(992) [sen...

How can I capture rsync progress messages in Perl?

I want to capture all the progress messages emitted by an rsync process from a Perl script. In certain circumstances this isn't working. Here's a typical rsync command line I use: rsync -aL --verbose --progress --bwlimit=100 \ --include-from=/tmp/78hJ2eDCs1 \ --include '*/' --exclude '*' \ /srcdir/* \ hostname:/target/ 2>&1 I...

Problem with calling rsync+ssh from java on windows

I'm having trouble calling rsync from java on windows vista with cygwin installed. Its strange as pasting the exact same command into a command shell works fine. My test java call looks like this. String[] envVars = {"PATH=c:/cygwin/bin;%PATH%"}; File workingDir = new File("c:/cygwin/bin/"); Process p = Runtime.getRuntime().exec("c:/cy...

Use rsync to copy only hidden files

I want to back up all the hidden files and directories in my homedir using rsync, but not the non-hidden files and directories. For example, given this directory listing: drwxr-xr-x 7 sophie sophie 238 31 Mar 08:45 . drwxr-xr-x 15 sophie sophie 510 31 Mar 08:14 .. -rw-r--r-- 1 sophie sophie 4 31 Mar 08:12 .foo drwxr-xr-x ...

Synchronize home directories from multiple clients to a server

I'm using multiple Linux laptops/desktops and want them to "share" home directories. NFS is unfortunately not an option. Therefor I was trying to create a bash script using rsync but I can't figure out how to do it. This is my example right now #!/bin/bash sync() { rsync -azvR --exclude-from=/home/ME/.rsync_excludes --delete -e 's...

rsync'ing files between two remote servers, get errors stating rsync command not found on remote server

Heyas I'm trying to rsync files between two servers with rsync -avlzp /source user@server:/destination but instead I get errors stating bash: rsync: command not found rsync: connection unexpectedly closed (0 bytes received so far) [sender] rsync error: error in rsync protocol data stream (code 12) at io.c(635) [sender=3.0.2] but ...

cygwin + rsync

I would like to backup a dir in Win XP on a Solaris server via rsync. I installed cygwin but when I type rsync I get 'command not found'. How can I install rsync? And how can I install ssh. I have installed Poderosa as ssh client (a sort of putty). ...

Unable to rsync between my server and my Mac

I have a server where I store data from Mac A and Mac B. I use rsync to keep the files updated between my Macs. I run the following code unsuccessfully #!/bin/zsh # to copy files from my server to my folder rsync -Pav $Masi:~/private/ ~/Dropbox/Courses/math/ # to copy files from my folder to my server rsync -Pav ~/Dropbox/Cou...

script-file vs command-line: problem with rsync and --exclude

Hi all I have a simple test bash script which looks like that: #!/bin/bash cmd="rsync -rv --exclude '*~' ./dir ./new" $cmd # execute command When I run the script it will copy also the files ending with a ~ even though I meant to exclude them. When I run the very same rsync command directly from the command line, it works! Does some...

How can I use rsync to backup files changed within a recent period?

Is it possible to specify a time range so that rsync only operates on recently changed files. I'm writing a script to backup recently added files over SSH and rsync seems like an efficient solution. My problem is that my source directories contain a huge backlog of older files which I have no interest in backing up. The only solution I...

Shell command to tar directory excluding certain files/folders

Is there a simple shell command/script that supports excluding certain files/folders from being archived? I have a directory that need to be archived with a sub directory that has a number of very large files I do not need to backup. Not quite solutions: The tar --exclude=PATTERN command matches the given pattern and excludes those fi...

Python Subprocess.Popen from a thread

I'm trying to launch an 'rsync' using subprocess module and Popen inside of a thread. After I call the rsync I need to read the output as well. I'm using the communicate method to read the output. The code runs fine when I do not use a thread. It appears that when I use a thread it hangs on the communicate call. Another thing I've notice...

Is there any .NET API using rsync?

I need to have a file synchronizing feature in my .NET application. Can I make use of rsync? Is there any API available? ...

How to use an expect script from php webpage ?

Hello, When i try to execute a program from php5 on my debian, the webpage freeze and the program do nothing. This script works when i call it from the command line. Safe mode is disabled. Echo stdout doesnt work (because of the freeze). I read some answers in google which tells of www permissions but if someone here have a quick and si...

Unable to exclude .DS_store in rsync

My code rsync -exclude='.gitconfig' -exclude='*~' -exclude='.DS_Store' /Users/Masi/bin/ /Users/Masi/gitHub/dvorak/ I run it. It copies the .DS_Store to the destination folder although it should not. This suggests me that the first exclusion do not work. It seems to be hard-coded in Git's default ignore -file to ignore .gitconfig. Ho...

rsync output

I am new to rsync and I do not understand the output I am getting, can someone help me out, the output contains lines such as, <f.st...... somefile.txt <f+++++++++ someOtherfile.zip .d..t...... someDir/ I do not understand what the options on the left mean, and I am having trouble finding the answer on google. Thanks. ...

Rsync help

Alright SoF, this is a little hard to explain, but i'll try my best. I have 2 identical drives. Let's call "S:" for source and "D:" for destination S: is the drive i keep all my files in (images, music, videos, documents, etc), and D: is a backup HD i (manually) back up every Sunday night. What i'd like to do is, backup S: into D:, w...