nav-left cat-right RSS
cat-right

Setting up Differential Backups for Websites

Backup Backup Backup by Topato
Backups. No one likes doing them, but they’re too important not to do. Typically when I’m doing stuff for my websites, I will occasionally do a tar of a directory and save it off, or even set up a script that will do this nightly. Then I have issues with disks filling up, and not wanting to delete my backups for fear of losing something (like the 20 copies aren’t enough!)
(more…)

  • Digg
  • Del.icio.us
  • StumbleUpon
  • Reddit
  • Twitter
  • RSS

How to Set Up Virtual Web Hosting with Apache

Apache
Up until a couple of years ago, I used shared web hosting for serving up my various sites. I went through several of them because for whatever reason, they turned out to not be what I wanted. I finally came to the realization that I needed to get my own dedicated host. I found a good provider (The Planet), and started migrating over my websites (along with my friend Chris’ sites). Something I knew I would have to learn is how to set up Apache to be able to do virtual hosting. In this guide, I’ll show you how I did it, and the script I created to make things easier.
(more…)

  • Digg
  • Del.icio.us
  • StumbleUpon
  • Reddit
  • Twitter
  • RSS

Linux RetroGaming: Atari 8-Bit

I’ve been into emulation again lately, and I started with my first favorite system of all time, the Atari 8-bit computer. When I was growing up, I had 2 different 8-bit machines:

The Atari 400:
Atari 400

(more…)

  • Digg
  • Del.icio.us
  • StumbleUpon
  • Reddit
  • Twitter
  • RSS

Gaming in Linux

GamingOne of the reasons people have a hard time making the jump to Linux is the fact that they have a hard time leaving the games they play in Windows. In this article, I’m going to describe some methods of getting around this hurdle, and make the transition to Linux easier. I’m not going to promise that your favorite game will work, but will give you the tools to be able to try. I’m also not going to be talking about native linux apps – those are pretty straightforward. This article will focus on Windows apps in Linux.
(more…)

  • Digg
  • Del.icio.us
  • StumbleUpon
  • Reddit
  • Twitter
  • RSS

How to Convert DVDs and TiVo MPEG2 Videos to H.264

H.264
Previously, I have showed you how to set up software to be able to rip DVDs to your hard drive, and I’ve also shown you how to copy your TiVo videos nightly. I’ve described the method I use to transcode the videos, but haven’t provided the script… Until now. After months of using and tweaking, here’s what I use. I call it VidProc.

(more…)

  • Digg
  • Del.icio.us
  • StumbleUpon
  • Reddit
  • Twitter
  • RSS

How to Copy Videos from a Series 3 TiVo to Ubuntu Linux

TiVo
This guide will show you how to set up a script to copy programs from your Series 3 TiVo on a regular basis, without having to do a thing after it’s set up!

Information you will need:

  • Your TiVo’s IP Address (needs to be static)
  • Your TiVo’s Media Access Key (MAK) – this can be found on tivo.com after you’ve logged in
  • The location where you want your files to be dumped (they are *big* – figure 1 GB per hour for SD, and like 5 GB per hour for HD)
  • The location where the files will eventually be stored

(more…)

  • Digg
  • Del.icio.us
  • StumbleUpon
  • Reddit
  • Twitter
  • RSS

Installing Perl Modules on Ubuntu Linux

perl
I’ve been a perl programmer/scripter/hacker for many years now, and I will frequently use CPAN modules to be able to do the out-of-the ordinary. This small guide is intended to help people easily install these modules.

First, let’s get the CPAN module up to date:

$ sudo perl -MCPAN -e shell
(take defaults to set everything up)
cpan> exit
$ sudo perl -MCPAN -e shell
cpan> install Bundle::CPAN

(answer yes to the question about saving data)
cpan> reload cpan

Then, to install a module, it’s simply:
$ sudo perl -MCPAN -e shell
cpan> install <name of module>

cpan> exit

  • Digg
  • Del.icio.us
  • StumbleUpon
  • Reddit
  • Twitter
  • RSS

Asynchronous Mirroring in Unix

Un*x
One of the issues I’ve found with having lots of data is the fact that I’m worried that a hard drive will fail, and I’ll lose something important. Since I did have that happen earlier this year, I am now determined to not let it happen again. I’ve been focusing a lot on resiliency – making it so that there are no single points of failure. Since I have been collecting a lot of hard drives, I decided to put them to good use, and set up some data replication onto multiple drives.

You might ask, why not just set up a RAID5? Or, alternatively, why not buy a Drobo and be done with it? I hear the first one a lot, especially since I deal with RAID day in and day out for my day job. The main issue I don’t do either of these things is that I’m cheap! I want to be able to use all of the hardware I have without tossing out old stuff. On my server, I have the following drives:

(more…)

  • Digg
  • Del.icio.us
  • StumbleUpon
  • Reddit
  • Twitter
  • RSS

How to Set Up a TiVo Media Server on Ubuntu Linux

TiVo
This guide will help you set up a media server to be able to play videos on your Series 3 TiVo, using pyTiVo. (Note: this post was moved from my old blog, but has been updated a bit)

First, install ffmpeg:

$ sudo apt-get install ffmpeg

Then, install git (needed to grab pyTivo):

$ sudo apt-get install git-core

Then, grab the latest version of the pyTivo script (Look at the Current Release page to verify that you have the right version):

$ cd /usr/share
$ sudo git clone git://repo.or.cz/pyTivo/wmcbrine.git
$ sudo mv wmcbrine pyTivo

Edit /usr/share/pyTivo/pyTivo.conf:

$ cd /usr/share/pyTivo
$ sudo cp pyTivo.conf.dist pyTivo.conf
$ sudo vi pyTivo.conf

The only thing that I changed is to comment out the default video share, and add my own:

[Movies]
type=video
path=/data/Video/Movies
[Television]
type=video
path=/data/Video/Television
[Music]
type=music
path=/data/Audio/Music

Run pyTivo:

$ sudo python /usr/share/pyTivo/pyTivo.py

Verify that things are working correctly — on the Tivo, go to “Now Playing List” and look for the shares.  If they appear and you can browse to them, you’re almost done!

One issue I had was with transferring the videos.  When I transferred them to the TiVo, it had a message of “unknown mpeg2 codec” or something to that effect.  Apparently the package for ffmpeg on Intrepid doesn’t have all of the codecs needed.  To install them, run the following:

$ sudo apt-get install libavcodec-unstripped-51

After I did this, videos were able to be transferred just fine.

The last thing to do is to make pyTiVo start automatically on bootup. To do this, simply copy the following script to /etc/init.d:

#!/bin/bash
# chkconfig: 2345 99 05
# description: pyTivo server

### INIT INFO
# Provides: pytivo
# Required-Start: $network
# Required-Stop: $network
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-description: pyTivo server
# Description: Start and stop the pyTivo server.
### END INIT INFO

RETVAL=0

start() {
echo -n "Starting pyTivo: "
pgrep -f pyTivo.py
RETVAL=$?
[ $RETVAL -eq 0 ] && echo "pyTivo already running: Exiting" && exit 1

# this call actually starts pyTivo.
python /usr/share/pyTivo/pyTivo.py > /dev/null 2>&1 &
RETVAL=$?
[ $RETVAL -eq 0 ] && echo -n "done"
echo
return $RETVAL
}

stop() {
echo -n "Stopping pyTivo: "
pkill -f pyTivo.py
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && echo -n "done"
echo
return $RETVAL
}

# See how we were called.
case "$1" in
start)
start
;;
stop)
stop
;;
restart|reload)
stop
sleep 1
start
RETVAL=$?
;;
*)
echo "Usage: $0 {start|stop|restart}"
exit 1
esac
exit $RETVAL

Note: I didn’t write this – I just grabbed it from somewhere when setting it up – let me know if you wrote it so that I can give you credit!

After creating the script, make it executable:

$ sudo chmod u+x /etc/init.d/pytivo

Then create links to /etc/rc3.d and /etc/rc1.d:

$ sudo ln -s /etc/init.d/pytivo /etc/rc3.d/S99pytivo
$ sudo ln -s /etc/init.d/pytivo /etc/rc1.d/K99pytivo

This should make it so that pytivo starts automatically upon bootup.

Hopefully you’ve found this guide useful. Next time, I’ll be talking about how to make the videos show up perfectly on the TiVo, with appropriate titles, etc.

  • Digg
  • Del.icio.us
  • StumbleUpon
  • Reddit
  • Twitter
  • RSS

How to Mount External Drives Statically on Ubuntu Linux

External Drive
The Issue:
You have external USB drives that you want to be mounted the same way every time, but the /dev/sdX device name keeps changing.

The Solution:
First, unmount the drive:
$ sudo umount /media/disk

Then, look in /dev/disk/by-id to find the correct device file:
/dev/disk/by-id/usb-WDC_WD30_00JB-00KFA0_DEF107679C83-0:0-part1

Add this to /etc/fstab:
/dev/disk/by-id/usb-WDC_WD30_00JB-00KFA0_DEF107679C83-0:0-part1 /mnt/data01 ext3 defaults 0 0

Create the mountpoint:
$ sudo mkdir /mnt/data01

Mount the volume:
$ sudo mount /mnt/data01

Now, this device should always be mounted on /mnt/data01.

  • Digg
  • Del.icio.us
  • StumbleUpon
  • Reddit
  • Twitter
  • RSS

« Previous Entries