Life in code, apps and OS's

Rsync looks interesting!

Posted on: January 17, 2007

Quote:

Originally Posted by Littleweseth View Post

Also, is there a better way to get my files onto my local, private webserver than ftp? FTP tends to be finicky, delicate, and quanta has already nuked one project off my hard drive via a slight misconfiguration (inspired, of course, by the crappy error messages quanta gives and having nothing at all to do with me or the time of night )

have you considered using rsync? i just set this up yesterday on my mac so i have a single command to sync a whole directory onto a server on my lan.

Code:

rsync -av localwebdir/ user@server:/var/www/

rsync also has the benefit of only transferring files that have modified, so if you have 100+ web pages/images/etc and you only update 2 or 3 pages, then only those 2 pages get sent to the server.

one thing to note with this is that the /var/www/ directory and subdirectories must be owned by the user that is logging in via rsync. since rsync uses ssh for its connection, you can use public/private key login with ssh from your local box and not have to type a password when updating the web folders on the server!

read “man rsync” for more info on the exact syntax of the command.

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


  • How To Dyndns Ubuntu | Order Goods: […] DynDNS Client Setup on Ubuntu | Life in code, apps and OS’s – May 18, 2008  · 7 Responses to "DynDNS Client Setu
  • lizrandolph10886: Wonderful article! We are linking to this particularly great post on our website.nKeep up the great writing. Click
  • waseem Ahmad: Dear. i have a separate application server and a separate mysql database server. when i want to access the application server to login from the local
%d bloggers like this: