New backup script debacle

A while back I made this post about the backup script I used for the file server I was using at the house at the time, a SUN Ultra 10. I went with the SUN because it was free hardware that I got from a friend and I had found a Debian flavor that would work on it but I always missed the USB support, as well as having distribution choices. When you go with SUN hardware it’s either Solaris or whatever you can find that has a SPARC port. I tended to favor OpenBSD, but Debian was the only Linux distro I could find.

A few months ago a friend at work told me about CentOS, which is a Linux distribution that was based on the Red Hat Enterprise Linux 4 Kernel (RHEL4), which is my distro of choice, so I decided to look into switching out the box with an old Intel box with Centos on it instead.

So I did this, but when I switched the drives over to the new box I kept getting a mount error. I determined that the root of the problem came from a non-clean shutdown of the SUN box, but in order to fix the problem I had to put the suspect drive in a USB enclosure and then I was able to mount and copy the files off of the drive. I guess the SCSI drivers were a little more forgiving than the IDE ones.

The problem with this whole deal was that the backups I had been taking were no good, as the tar files I had been making were corrupt, which didn’t work out very well. After I managed to recover the files I was a little suspect of using the same backup methodology, so I held off without a backup strategy.

So the time has come to implement a new backup script for this purpose, and this is the latest backup script offering I have come up with. This script simply does a file copy from one location to another, using the return code from cp to verify if the script completed correctly. In order to send myself notifications I would simply need to scrape the log of the server and look for the string “FAILED”, then email myself.

The code of the script is below, and an example execution of it would be “backup.sh “/dirtobackup””. The passed is a list of directories/files to backup which is then backed up to the variable that is specified in the script. This location can be altered by changing a variable assignment in the file. The source for the script can be copied from below or found from this link.

#!/bin/sh

# Created By:  Jason Cumberland

# Date Created: 8/26/2006

# Purpose:     Copies directories passed in first variable to backup directory

# Parameters:  $1 space spirited list of folders to backup

#Change the variables below to fit your computer/backup

FOLDERS=$1                                    # folders to back up

BACKUPDIR=/mnt/bkup/pinky                     # where to store the backups

BACKUPPROG="PINKY_BACKUP"                     # program name for message log

RETRIES=3                                     # number of retries to attempt

# app locations and configurations

BACKUP="/bin/cp -u -R --reply=yes"                   # name and location of backup program

LOG="/usr/bin/logger -t $BACKUPPROG"          # name and locaction of logger

# check to see if any folders were passed

if [ "$1" ]; then

echo "Backup starting for \"$FOLDER\""

for folder in $FOLDERS

do

$LOG "Starting backup of \"$folder\"."

$BACKUP $folder $BACKUPDIR

if [ "$?" = 0 ]; then

$LOG "Backup of \"$folder\" completed with SUCCESS."

else

$LOG "Backup of \"$folder\" completed with FAILURE."

fi

done

else

echo "No folders passed to program for backup"

fi

echo "Backup Completed"

 

Sesame street is a fashion time capsule

As Dylan has started to become more aware of his surroundings we’ve changed our television viewing habits, as well as numerous others, quite a bit.

We have a full time or part time philosophy when it comes to watching TV. We generally use it as background noise for watching Dylan, working, free time, or some combination, so this would be considered part time TV for us and relegated for shows that we like but don’t care to pay attention to all the time. Full time TV would be dedicated for the shows that we care about what happens.

It used to work out pretty well for us to tivo our normal shows in addition to 1 or 2 syndicated series, so we always had something to watch, whether full or part time. Full time was mostly dedicated to recurring fall, mid and summer shows, although we started with The Practice and then we moved through the Law and Order spin-offs until we had seen most of them. Syndicated shows that don’t have a strong continuous plotline tend to play the same favorites over and over, so we got tired of deleting them and just cancelled the season passes.

So it kind of worked out that Dylan really didn’t care for watching those shows anyway. We started looking for semi good baby shows (other than the creepy Teletubbies, shudder) for him to watch, and Sesame Street ended up coming on several times a day. So, with a bit of nostalgia, we turned on a season pass for it and started watching it at certain parts of the day.

I figured that after 20 years Sesame Street would have changed a bit but it turns out they have pretty much the same characters on the show, they just look a little older, but there are all these odd things about the skits that just seem like they are time traveling to make certain parts. I’ve noted a few of these things because I just don’t know how to explain them.

  • Maria from the block was on the show wearing a fanny pack in the episode Elmo Goes to the Firehouse. I guess it takes a fire in Hooper’s store to scare someone into wearing that 90’s leftover.
  • Robin Williams was doing a guest spot wearing a shirt that he had to have stolen from Paradise Island. As if that wasn’t bad enough, the skit was about laps and it culminated with him having five kids pile into his lap while he gives a creepy smile. To top it off he follows this all up with “Now I just need more lap!”, and then cuddles the children. WTF?
  • During the credits of the show they sometimes show 10-20 children dancing, and I caught 2 or the couples switching back and forth between Can’t Touch This and Ice Ice Baby. They flowed like a harpoon.
  • Ellen Degeneres was walking down the street (also borrowing the wardrobe from her old show), jamming to a cassette player that was half the size of her head when she ran into Elmo. She and Elmo then proceeded to stretch the apparently magical headphones over both of their heads so they could both listen. It was just about the cheesiest moment I’ve seen in a while.

Speaking of Elmo, it turns out that he’s like liquid crack for toddlers. When that last 20 minutes of the shows turns into Elmo’s World Dylan will shoot across the room to watch him. The horrible part about this is that the format for the show is exactly the same every time; sp the stupid songs get stuck in your head. Imagine being a grown (grown, that’s hilarious) man walking around sing “La la la la, La la la la, Elmo’s World”.

If only I could find reruns of The Electric Company

So…

Why would you walk into a bathroom, wash your hands, and then walk to the urinal to pee? Are you trying to keep your dirty hands from your nice clean urine?