For my network, I’ve got two Mythtv machines. One is Saturn, the main recording backend. The other is Neptune, the supercharged media workhorse who has a frontend in addition to running my distributed DVD ripping, being part of a compile farm, holding all my music, and mysql databases.
Neither of the two are on a battery backup because I’m cheap, so when things go down, they don’t always come right back up. And sometimes Saturn’s mythbackend crashes. It happens.
So to prevent this, I added my mythtv-frontend user account to Saturn’s sudo list. Then I generated a ssh key and put it into the authorized_hosts file. Since all my accounts are managed with LDAP and /home is mounted over NFS, its really easy to syncronize both machines.
The final step is to change the ‘WOLBackendCommand’ setting in the database. The only sudo command mythtv-frontend can execute on Saturn is /etc/init.d/mythbackend restart. So I changed that setting to ssh saturn sudo /etc/init.d/mythbackend restart;sleep 5. The extra sleep allows for startup lag.
Now, if both machines go down, there isn’t a race condition between saturn waiting for neptune’s database to start before starting mythbackend. Once Neptune’s mythfrontend starts up it notices there isn’t a backend connection available. So it ssh’s into saturn, (re)starts the backend (It might be hanging, so thats why it restarts it), and waits politely for it to start.
I use the Gnome application Glom to maintain a personal database of things. I use it instead of KDE’s Kexi because it is more complete and doesn’t crash nearly as much. I created my Glom database before I upgraded to Fedora 9 to get my new KDE4, which means it used Postgres 8.2. Fedora 9 uses Postgres 8.3.1, which uses an incompatible database format. Upgrading it takes a bit of work, but it can be done very easily.
First, you need to get a copy of Postgres 8.2. I downloaded the source tarball from postgresql.org and unpacked it. In it, I created two directories, build and install. Since I will only need to run 8.2 very briefly, I’m installing and building it all in once place. After its all done, I can then just remove the tarball and the one directory it created.
Enter build and run ../configure --prefix=/absolute/path/to/install/dir with the correct prefix. Then make and make install. Now you’ve got a tiny temporary installation of postgresql. Set your PATH environment variable to the bin subdirectory where you installed it, then run glom. It should start normally and everything works. In another terminal, use pg_dumpall -h localhost -p 5434 >outfile.sql to get a dump of the glom database.
Once your database is neatly tucked away inside that file, you can kill the 8.2 server with ctrl-c or SIGINT. Now, rename the directory where the glom database is held. You’ll have to ‘recreate’ the database in glom, using the new 8.3 server. Just rerun glom and create a new database with the same name and folder as before. Keep it running while you run pgsql -f outfile.sql -h localhost -p 5434. After that finishes, exit glom.
After that, copy the .glom file you find in your backup over to replace the one glom just created. All properties of your database should now be upgraded to the 8.3 postgres format. Feel free to delete the temporary install now (after checking to make sure it works of course).
I can imagine that there are one or two people out there with these questions, so I’ll answer them right here:
Because 8.3 is a newer version. The frontends (pgsql, pg_dumpall) shouldn’t care what version the server uses. They contain bugfixes and are more (read: exactly) compatable with the 8.3 server, so it makes sense to use something that is both forwards and backwards compatible. 8.2 doesn’t know about 8.3, so there might be some unforseen confusion.
That file holds all your form layouts. Without it, you’d have to redesign all your data entry pages. That’d suck, huh?
I’ve been toying around with my Thinkpad X61’s bluetooth, and finally managed to get HotSync to work over bluetooth thanks to the helpful instructions at pilot-link.org. In KPilot, just set the device to net:any. The UI might complain about the device not existing, but that doesn’t stop the underlying pilot-link libraries from syncing correctly.
Hooray bluetooth!
Hey, this counterize II thing is pretty cool. I can see what searches bring people to my site. An item in the logs shows that someone is searching for ‘cron pisg’, which brings up this page. Pointything does not use cron to generate the PISG stats, but before I made the jump to an event driven system he did.
The beautiful thing about MythTV is that you can watch TV anywhere. This is thanks to the separation of backend and frontend. The backend does all the recording and file storage, while frontends simply connect to the backend to receive the recorded files. The first step to watching TV on your Xbox is to install Linux. And thats just the easy part. (more…)
If you have a robosapien, you probably thought it was pretty cool when you got it, right? Then, it lost its fun value. I mean, really now. You can only watch the same exact dance a set number of times before wanting to kill a small animal. So what to do? Make it into a weapon of course.