Tag Archives: rsync

Rsync tips…

9 Oct

rsync if not installed:

    • On CentOS: yum install rsync

Commands to synchronize servers:

  • Synchronize deploy_server/10.16.35.212 (destination) with source_server/10.16.35.211 (source)
    • Rsync Tips
      • The leading “/” in the source directory is significant
      • Replace myuserid with your userid
    • Source Code
      • rsync -rav -e “ssh -l myuserid” 10.16.35.211:/opt/myapp /opt/myapp
    • Xhprof
      • rsync -r -a -v -e “ssh -l myuserid” 10.16.35.211:/opt/xhprof/xhprof-0.9.2/ /opt/xhprof/xhprof-0.9.2
    • PHP.ini
      • rsync -rav -e “ssh -l myuserid” 10.16.35.211:/etc/php.ini /etc/php.ini
    • HTTPD.CONF
      ***rsync -rav -e “ssh -l myuserid” 10.16.35.211:/etc/httpd/conf/httpd.conf /etc/httpd/conf/httpd.conf
    • NGINX
      ***rsync -rav -e “ssh -l myuserid” 10.16.35.211:/etc/nginx/nginx.conf /etc/nginx/nginx.conf

References

Advertisements