Archive for January 2009

Linux remote backup via ssh

Friday, January 30th, 2009 by tburns

In yesterday’s entry, I posted a backup script that is used to create tarballs that are stored on the filesystem. This is the script that is run remotely that pulls those tarballs across the cloud to another machine.

This is used to run small backups remotely on, in this case, a virtualized machine running on a xen platform at linode.com. The virtualized machines are running primarily as webservers. The size of the backups is less than 20MB each.

Read more »

Linux backup script for on-disk backups

Thursday, January 29th, 2009 by tburns

Here’s a quick and easy backup script for linux servers. I use this to backup a web server without an attached tape drive. It runs a full backup each time – no incrementals… no GFS management… just a straight-ahead full backup written to disk then pulled down via ssh to another, remote server off-hours.

In this case, the server creates a file that is less than 20 MBs. So it’s easy to pull down later. This script allows for on-the-fly directories to be selected or unselected for backup. I always backup the home directories and the etc directories. Anything else can be listed separately.
Read more »

DHCP to static IP and back again

Wednesday, January 28th, 2009 by tburns

I was working on an infrastructure project one day where I needed to do some connectivity testing on select switch ports VLAN’d to a network that didn’t offer DHCP addressing to connected devices. I walked my laptop down to the switch stack and went through the process of setting my nic to a static IP along with static DNS entries and a new gateway. So, I decided it would be a lot easier to script it.

This script backs-up the original DHCP sttings; builds the static IP configs, along with DNS entries and gateway settings; re-initializes the interface to use those settings; then allows the user to restore the settings back to DHCP when done. It’s not complicated, it’s just easier than doing it all manually.

Read more »

New site launch: preposterone.com

Tuesday, January 27th, 2009 by tburns

Preposterone.com is a new site FourMilesToMay launched earlier this week. It’s an Action Movie specific review site. It uses the Netflix API to grab movie details… users rate movies using a scale based on the first Die Hard (1986) movie and This Is Spinal Tap (1984). Who wouldn’t want to bookmark it?

The site lives on a xen virtual machine running linux. It’s managed by linode.com. This means all the server management is done by the subscriber. No shared hosting. No special requests for ssh access. No having to rely on an ISP help desk for site maintenance or to ask (periodically) why the site isn’t up.

Virtual Machine monthly fee = $20
ISP aggravation = $0
Ability to manage your own linux server = priceless

Using httpd authentication: basic and mysql

Monday, January 26th, 2009 by tburns

Basic httpd Authenticatiion allowing for .htaccess files to be used throughout the site’s file structure by virtue of the ‘AllowOverride All’ option. These directives are put into the httpd.conf file, which in most RedHat-related distributions, is located in /etc/httpd/conf.:


<directory "/var/www/html/domain.com">
AuthType Basic
AuthName "Basic Authentication: Domain.com"
AuthUserFile /etc/httpd/conf/domainDotCom-users
AuthGroupFile /etc/httpd/conf/domainDotCom-group
Require group domainGroup
AllowOverride All
</directory>

Read more »