Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I'm currently using rsync on a script that deploys a PHP application from a staging to a production server. Here is how:

rsync -rzai --progress --stats --ignore-times --checksum /tmp/app_export/ root@app.com:/var/www/html/app/

This is currently outputting a list of every file that's being compared (every file in the project), but I'd like it to output only the modified ones, so I can run it with a --dry-run option to check that every deploy is updating only the desired files.

NOTE: The best I could do so far is grep fcst the results, but I'm looking for an rsync option that I'm sure it's there but I can't find it in the man pages.

Thanks in advance!

share|improve this question

1 Answer 1

up vote 2 down vote accepted

If there's an rsync option to do exactly what you're asking, I didn't find it in the manpage either. :-)

That said, I don't see the problem with grepping the output of rsync -i to parse out exactly what you need. That feels nice and Unixy to me.

One nit-picky quibble with your rsync command: the -r is redundant, as it is implied by -a.

share|improve this answer
1  
Thanks man. I wonder why (with the variety of options this program has) there isn't an option for that. Seems pretty basic for me. –  Mauro Sep 11 '12 at 22:15

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.