Monthly Archive for March, 2009

My 1st Vertorama

Vertorama of Sunset at Shoreline Park while Jogging

Not a HDR, neither shot with a dSLR, but a hand stitched/blended Vertorama. (rhythms!)

I first saw the term “vertorama” in one of Daniel Cheong’s flickr photos then read more about it from Panorama_Paul Vertorama tutorial , there’s also an interesting read here. Basically Vertorama are taken by taking at least 2 landscape shots, one above another, and combined to become a “vertical panorama”. The reason I like the vertoramas is that they are more pleasant looking than HDR done badly, requires less shots, replicate what the graduated filter does, works even with the simplest auto settings, and looks great like a medium format photo with amazing lighting contrast especially taking sunset photos.

During the evening run at Shoreline park towards Adobe creek, I thought the sunset shouldn’t be gone to again and took this sequence of photos which wouldn’t stich a panorama well with my Lumix FX500. The 3 rightmost photos were used for the vertorama.
Photos that didn't stitch well for a panorama

As the photos didn’t overlap well, I did the blending by hand. The images were added as separate layers, positioned them manually to align, applied masks, blending and contrast adjustments. Applied highlights and shadows and curve adjustments but the microcontrast is too strong.

Please comment if you think the post process could be done better or differently.

Backup your Backups (Subversion)

Its interesting that while source code repository like Concurrent Versions System (CVS) and Subversion (SVN) are primary used as for source code sharing and revision management, one useful purpose for these repositories are actually useful for backups. Its like using using Google Docs not only for online collaboration, but to keep your documents in the cloud in case you lose them.

An interesting twist at work is that I have to backup the subversion database in case Subversion fails- here we are backing up the backups.

The power and freedom in linux usually means that often no one does a single job a single way. So, here’s my take on writing a script used for saving my svn databases.

# Backup SVN Script
DIR=/svn # Svn directory
DATE=$(date +%Y%m%d) # Date
BACKUPDIR = /backups

cd $BACKUPDIR
# Clear a temporary directory
rm -rf dumps/*
# Creating a list of SVN directories
for i in $(ls -l $DIR | awk '/^d/ { print $NF }') ; do
echo $i
# Export each SVN database
svnadmin dump $DIR/$i > dumps/$i.dump
done
cp $DIR/* dumps/ 2> /dev/null
# Taring them
tar zvcf archive/svn$DATE.tgz dumps/*
# Copying to another safe location
cp archive/svn$DATE.tgz /another/secret/location

Brief explaination of the script, if the script and comments doesn’t speak enough. All svn databases are dumpped in svn export/import friendly formats which are then zlib tarred.

Lets assume one day Murphy’s Law take places, your entired svn database vanish into thin air but your backups in the safe secret location is intact. Here’s how you could restore the subversion database easily, assuming your SVN servers are up and running.

# load_repo_after_the_sky_crashes.sh
tar zvxf $1.tgz # extract the backups
for i in $(ls -l dumps | awk ‘/^d/ { print $NF }’) ; do
echo $i
svnadmin create $i
svnadmin load $i < $1.dump
# chown / chmod file system permissions if needed,
done

The method for backups and restore is similar to migrating SVN repository and here’s a post if you wish to read up on them.

The backup script may be called by a cron job and run periodically like daily. To prevent taking too much disk space, you may decide to keep a number of the latest backup copies and delete older backup copies. Here’s a line in bash you could do for this.

ls -t * | tail -n +10 | xargs rm -rf # Delete everything except the 9 latest files

Who backup the backups like who guard the guards?