March 12, 201412 yr I have an unRaid server that uses IPMI to wake another backup server and start an rsync backup to it. At present I only check that it is live by pinging its IP address, but need a much more comprehensive test of its readiness to accept an rsync backup. These questions could be such as: 1. Hey BACKUP server, Are you awake? 2. Is your array started? 3. Are you doing a parity sync? (important because I kill the backup server once the rsync is complete) 4. Is there enough room on all disks to do the backup? 5. Are there any errors in your syslog? 6. Do you feel like doing a lot of really boring and painful work right now.... Now I could start hacking away and building some of the above with my very limited bash level scripting skills. But I would hate to develop something that has already been invented. Has anybody got a code base that does some of the above? ****** Here is code to - Check to see if Backup Server has come to life ******** HOSTS="192.168.1.85" for myHost in $HOSTS do ping -c 1 "$myHost" > /dev/null if [ "$?" -eq 0 ] ; then echo "Hosts up" else echo "Host down 192.168.1.85" fi done
March 12, 201412 yr Author Now this script won't be running on the backup server just the main server. Is there even any way to access another servers ( the backup servers ) syslog. Is there a way to tell another server (the backup server) to launch a script on it? Then they would need to pass results back and forth. Stuck on this one... Sent from my mobile
March 12, 201412 yr You could use ssh, and sshfs to mount the backup server. Then use cat with a grep pipe to find errors. That's how I do things with my other server. However it doesn't run slack so you'd have to find the fight package for sshfs. Although I guess an easier way would be to create a symbolic link from the log folder to a share.
March 13, 201412 yr Author Since both servers are hooked up to the same router, normal mounts are possible too. Never played with sshfs before. Are there other reasons to look at it? Sent from my mobile
Archived
This topic is now archived and is closed to further replies.