rsync: synch both boot and data volumes.

HOWTOs UNIX Web Development

If you have mission critical servers, you know that a backup is essential. I do not want my mission critical web server to go down. Along comes rsync.

How to set up rsync to synch my boot drive (and make it bootable) as well as synch my data files (html/php files):
First, you will to set up passwordless ssh between your servers. This is a good tutorial, except make sure step #5 is actually: /var/root/.ssh/cat >> authorized_keys2 . Now you are ready to send data from your main server to the backup(s).

I have a daily cron job to run my data rsync script.
The script is: time sudo rsync -a -vv -z -e ssh "/Volumes/www" "root@".
(where /Volumes/www is the location of all my data files and is the IP of my backup web server)

Boot drive (that is bootable)
I have a weekly (I chose weekly because if I apply an update to something that proves not to work, I know I have some flexibility) (and yes I always apply updates to a test server first) cron job to run my boot script.
The script is:time sudo rsync -a --exclude /dev/* --exclude /afs/* --exclude /private/tmp/* --exclude /Network/* --exclude /Volumes/* --exclude /automount/* --exclude /private/var/run/* -vv -e ssh "/." root@ --delete ; sudo rsync -qe ssh'`sudo bless -folder /Volumes/BackUp/System/Library/CoreServices`' .
(where /Volumes/BackUp is the location of all my boot(System) files and is the IP of my backup web server)

Next up: IP Failover! (another day)

Using rsync really cuts down on my worry..well a little, and also helps me keep all my servers synched to the primary server. Enjoy, it is time we started making these servers work for us, not the other way around!

One thought on “rsync: synch both boot and data volumes.”


    Thank you for some other informative web site.
    The place else may just I get that type of info written in such an ideal manner?
    I have a project that I am just now working on, and
    I’ve been on the look out for such info.

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Serenity Now!

my newest sport: the daily commute.

In high school, I played basketball, volleyball, was on the golf team, on the track team and played some serious back yard football. I was very athletic. I miss playing all the sports I did when I was younger, but I have to say I am still using things I learned from all of the […]

Serenity Now! Standards

metra riders: single seats are upstairs.

I have been riding the Metra for over five years now, and not once have I ever put my bag next to me on a busy train to try and deter other people from sitting next to me. I have also never asked someone to move their bag until this morning. My morning express is […]