Stuff too big to tweet, not big enough to blog.

18th December 2009

Photo with 1 note

I’m at Local 123 cafe with my buddy jch (coffee is excellent here, btw), and just completed a db migration to postgresql 8.4.2 from 8.2.13. Thing is, I didn’t upgrade on production— I recovered to a failover server, then switched to make the other postgres the primary. So now caffeinatedcode.com is working on a true two-tier setup.It was interesting to test a backup-recovery, and I am glad to see that it is relatively painless to do so. There’s a lot of fear when upgrading, especially when skipping ahead two major revisions. Who knows what they changed. In this case, it was good to work with parallel db’s and hardly any downtime at all.

I’m at Local 123 cafe with my buddy jch (coffee is excellent here, btw), and just completed a db migration to postgresql 8.4.2 from 8.2.13. Thing is, I didn’t upgrade on production— I recovered to a failover server, then switched to make the other postgres the primary. So now caffeinatedcode.com is working on a true two-tier setup.

It was interesting to test a backup-recovery, and I am glad to see that it is relatively painless to do so. There’s a lot of fear when upgrading, especially when skipping ahead two major revisions. Who knows what they changed. In this case, it was good to work with parallel db’s and hardly any downtime at all.

17th December 2009

Link

Simple backup shell script →

Found in an old drive archive, this script would get cron’d and rip to CD every day. I’m sure there’s more elegant solutions, but this did the job well.

#!/bin/sh 
# NAME: sys_backup.sh
#
# DESCRIPTION: A cool backup script that burns the system files to a CDRW
# This script originally runs on RH9 with a 40x CDRW drive.
# Requires a CDRW media in drive at all times (min 4x RW)
#
# ORIGINAL AUTHOR: Kris Resellmo
#
# MODIFIED: $Date: 2003/10/09 00:52:58 $
# $Author: dennis $
# $Revision: 1.1 $

# General script vars
NOWDATE=`date "+%Y-%m-%d_%H%M"`
ISONAME=peerview.iso

# Directories to back up
DB_ARCHIVE_DIR=/bu/database_backup
REPOSITORY_DIR=/bu/repository_backup

# Location of backups
BACKUPDIR=/cdrw_temp/data
BACKUPTEMPDIR=/cdrw_temp

# TAR arguments
TARARGS="cf -"

#####
# Script start
echo "$NOWDATE System backup script started."

# Remove previous backup files
echo "Cleaning up previous backup gzipped files..."
rm -f $BACKUPDIR/*.gz
#rm -f $BACKUPTEMPDIR/$ISONAME
echo "Cleanup done."

# Archive files
echo "Now tar gzipping $DB_ARCHIVE_DIR"
tar $TARARGS $DB_ARCHIVE_DIR | gzip > $BACKUPDIR/db_$NOWDATE.tar.gz
echo "Now tar gzipping $RESPOSITORY_DIR"
NOWDATE=`date "+%Y-%m-%d_%H%M"`
tar $TARARGS $REPOSITORY_DIR | gzip > $BACKUPDIR/cvs_$NOWDATE.tar.gz

# make ISO
# delete old ISO if it exists
if [ -f "$BACKUPTEMPDIR/$ISONAME" ]
then
echo "Deleting previous backup ISO file at $BACKUPTEMPDIR"
rm -f $BACKUPTEMPDIR/$ISONAME
fi

echo "Creating new ISO image..."
mkisofs -r $BACKUPDIR > $BACKUPTEMPDIR/$ISONAME

# burn cd and blank old disc
echo "Now burning CD image to media..."
cdrecord speed=4 dev=0,0,0 blank=fast -multi -data $BACKUPTEMPDIR/$ISONAME

# Finish up
echo "Finished backup of system at `date "+%Y-%m-%d_%H%M"`"

Tagged: scriptshellcodebackup

17th December 2009

Link

LEGO my EGO →

Most notable part of this article for me: “People will continue to do what they do, say what they say, and believe what they believe. You really do not have much, if any, control over the thoughts of others.”

Tagged: ego,social medianarcissists

17th December 2009

Link

PHP Security Release →

PHP 5.2.12 released with many “security enhancements and fixes”. Personally, I think uninstalling PHP is the best security for your webserver.

Tagged: patchphp suxsecurityvulnerability

15th December 2009

Photo

Coders: Avoid HFCS, pure cane sugar is what you seek. Fructose = bad: http://j.mp/6dYgVf

Coders: Avoid HFCS, pure cane sugar is what you seek. Fructose = bad: http://j.mp/6dYgVf

Tagged: coding lifeimbibe

15th December 2009

Text

So much good stuff

There’s so much being built upon in JEE6 as I watch the Sun Java Virtual Conference today on JEE6 and Glassfish v3.

Glassfish is a pretty kickass appserver from initial previews. And it’s surprisingly easy to get up and running.

All the memories I’ve had of EJB are wiped away with the new EJB 3.1 spec.