"Jason A. Smith" <[EMAIL PROTECTED]> wrote: > We do it with a modified gmetad init script (patch attached from old > version of gmetad), and for backups, we just do a nightly restart of > gmetad.
Thank you. I didn't do it exactly the way you did, but I used yours as a template. I decided to use rsync without --delete as my way of ensuring we don't delete metrics from disk if something is wrong with the tmpfs directory. Here are my additions to /etc/init.d/gmetad : TMPFS=/ganglia/rrds At the beginning of the start section: # restore from disk to tmpfs if necessary if [ "$TMPFS" -a ! -d $TMPFS ]; then echo -n "Restoring /ganglia/rrds from /var/lib/ganglia/rrds..." rsync -azH /var/lib/ganglia/rrds /ganglia/ echo "done." fi At the end of the stop section: # back up from tmpfs to disk if [ "$TMPFS" -a $RETVAL -eq 0 -a -d $TMPFS/__SummaryInfo__ ]; then echo -n "Saving /ganglia/rrds to /var/lib/ganglia/rrds..." rsync -azH /ganglia/rrds /var/lib/ganglia/ echo "done." fi And here is my cron job to back up from tmpfs to disk every 10min: 0,10,20,30,40,50 * * * * if [ -d /ganglia/rrds/__SummaryInfo__ ]; then rsync -azH /ganglia/rrds/ /var/lib/ganglia/rrds/; fi 2>&1 | /usr/local/bin/cronmail sysadmin P.S. cronmail is a very short script I wrote that emails the output piped to it, with a nice subject line that has host, time, and first line of output, but only if the output piped to it was non-blank; if what it read was entirely whitespace, it silently does nothing http://thwip.sysadmin.org/cronmail -- Cos ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ Ganglia-general mailing list Ganglia-general@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ganglia-general