Using rsync to Mirror Data to a Different Server

Like many things on this blog, I don’t use this enough to remember the full command when I need it. Like always, don’t just copy and paste this information. Use the man pages to verify what it is that you need to do.

rsync -a -v --delete --update --stats /path/to/local/data/ user@<server-name>:/path/to/folder/

This version of the command essentially maintains ownership and permissions while allowing for file changes, including file deletions, to be copied from the local server to another server. It mirrors the data on the local server to a second server. It also provides a listing of statistics when the command has completed.

A similar command using robocopy on MS systems was posted at an earlier date and can be found here:

OS X: force quitting applications

I have a couple of Macs at work.  Funny,  I usually install VirtualBox and live in a Linux VM.  So on those occasions where I need to kill a rogue app in OS X, I get quite peeved when I can’t remember the “we do it differently” key stroke combinations.

Bring up menu:

Command+Option+Escape

From Dock:

Option+Right Click

From Apple Menu:

Shift+Click on Apple in menu

Activity Monitor:

Select app then Quit Process button

From terminal:

kill -9 [pid] or killall [process name]