Re: [Cvale] Update to the configuration question:
Lets try that again: #!/bin/sh raidlist=`/sbin/mount | grep raid | awk '{print $1}' | sed -e 's/\///'` echo $raidlist #!/bin/sh #This script will sync Jobserver 1 to Jobserver 2. This script is "safe" and works great. I am adding some other rsyncd.conf #volumes to help with printer syncing. LIST=`rsh -l rsync 192.168.40.4 /getraid.sh` #LIST="raid00 raid01 raid02 raid03 raid04 raid05 raid06 raid07 raid08 raid09 raid10 raid11 raid12 raid14 raid15 raidacct" echo $LIST USER="root" LOGNAME="root" echo `date` for d in $LIST; do echo "Syncing files from $d" #rm -rf /$d/* /usr/local/bin/rsync -qa --delete --exclude=tmp --exclude=Network\ Trash\ Folder 192.168.40.4::$d /$d/ done echo "Syncing files from /usr/lib/lp" /usr/local/bin/rsync -qa --delete 192.168.40.4::lp /usr/lib/lp/. echo `date`
Re: [Cvale] Update to the configuration question:
Here is the requested script for those who are interested: {rsync.sh} #!/bin/sh #This script will sync Jobserver 1 to Jobserver 2. This script is "safe" and wor ks great. I am adding some other rsyncd.conf #volumes to help with printer syncing. LIST=`rsh -l rsync 192.168.40.4 /sbin/getraid.sh` #LIST="raid00 raid01 raid02 raid03 raid04 raid05 raid06 raid07 raid08 raid09 rai d10 raid11 raid12 raid14 raid15 raidacct" echo $LIST echo `date` for d in $LIST; do echo "Syncing files from $d" #rm -rf /$d/* /usr/local/bin/rsync -qa --delete --exclude=tmp --exclude=Network\ Trash\ Fo lder 192.168.40.4::$d /$d/ done echo "Syncing files from /usr/lib/lp" /usr/local/bin/rsync -qa --delete 192.168.40.4::lp /usr/lib/lp/. echo `date` {end} This one resides on the master server: {/getraid.sh} #!/bin/sh raidlist=`/sbin/mount | grep raid | awk '{print $1}' | sed -e 's/\///'` echo $raidlist {end}
Update to the configuration question:
Ok I'd like to thank everyone for their help on this and here is what I came up with. (thanks to Kristian Hoffman at PC-Intouch) Before RSYNC runs, I use rsh (with the mirrored server as a trusted host) to run the following command on server 1 `mount | grep raid | awk '{print $1}' | sed -e 's/\///'` from which the output is placed into a scalar named RAIDLIST. The output is consistent with the "keys" I have defined in rsyncd.conf I then run that list through a foreach loop syncing each of the "mounted" raids. If a raid is unmounted (for whatever reason) then it is not synced. Again thanks everyone, if someone else uses this let me know how it works out for you. Tyler.
Some configuration help needed.
Hi everyone, I have been using rsync now for about 2 months on my companies' two job servers with great success. Twice when our main jobserver has gone down, our second "mirrored" server has picked up the ball and ran with it. However something happened last night that was very (funny to me) interesting. The #2 Controller on our Andataco raid cabinet died, so instead of calling me or my other sysadmin partner our GM decided to reboot server 1 on his own. What ended up happening was several raid volumes did not mount because of a controller fault, otherwise the server came up fine including rsync (not rsync's fault at all). As most of you can already guess, server 2 came calling and got empty volumes, esentially wiping server 2 out. :) Now my question is, does anyone have a suggestion of a test that I can run prior to rsync (which is run through a crontab) that I can use to stop rsync? The server actually wasn't rebooted for about two hours so at one point it was "down". Basically we sync the servers once an hour because we do high volume graphics editing on very critical time schedules. Thanks, Tyler.
Ooops.
Sorry guys for the previously stupid post. I fixxed my problem by excluding Network Trash Folders that the Macintoshes created on our server. Sorry. Tyler. Tyler Hardison It is better to shut your mouth and be a fool, Systems Administrator than to open it and prove it Graphics Atlanta IV - Samuel Clements (Mark Twain) (925)455-2777