Skip to main content

Posts

selective table restore from mysqldump

I recently had to restore a corrupted table that had resulted from a full disk. I had been using automysqlbackup as my backup script. Each database had a corresponding backup file. It would have been easy to use a text editor to edit out the tables that you didn't want to restore but this database had grown to 1G. STEP 1: Restore table structure If the table structure is corrupted, you need to retrieve the CREATE TABLE statements from the backup. To do this you can use grep: zcat backup.sql.gz | grep -A 20 'CREATE TABLE `tablename1`' > tablestructure.sql This command will create tablestructure.sql containing the CREATE TABLE statement and 20 lines after that. You may have to change the parameter from 20 to whatever to get the entire statement. Once tablestructure.sql had been edited to only contain the proper CREATE TABLE statement, you may now restore the table structure. mysql -u user -p dbname STEP 2: Extract and restore the table data This command will create a sql ...

Setting up Corporate Ubuntu Desktops

This guide has been updated for Ubuntu Hardy 8.04.1. The following is the official installation guide: https://help.ubuntu.com/8.04/installation-guide/i386/index.html The preseed method will enable a more automated install. You will want to enter the proxy a local apt-cacher server if you have one to speed up the updates and installs of new packages. Post Installation Tasks Updating and Installing Packages In Synaptic, configure proxy as needed. If you have an apt-cacher service running on the proxy server, it will make your updates much faster if the packages have already been downloaded by a prior machine. Click on Reload Click on Upgrade Install ubuntu-restricted-extras Install ttf-liberation Apply Configure Desktop to Remove Annoying Stuff In System -> Administration -> Login Window -> Accessibility, uncheck the sounds In System -> Preferences -> Sounds -> Sounds, uncheck Play System Sound to remove annoying sounds If you want to ch...

Pentaho Quick Install

Pentaho has a preconfigured install package that can be used to evaluate the platform. The default install will only work if it is run on your own machine. There are two things that you'd want to do if you want others to test the platform. 1. Allow access from other machines on the LAN. You need to edit web.xml file located at %PCI%/jboss/server/default/deploy/pentaho.war/WEB-INF/web.xml where %PCI% is the folder where you uncompressed the Pentaho preconfigured install. Look for the string base-url. http://localhost:8080/pentaho/ Change the value into an IP address or the computer name that will resolve to it. 2. Change the default port 8080. Sometimes port 8080 is already being used by another application, possibly Tomcat. Pentaho has a web container using port 8080 that may conflict with the existing application. You need to edit server.xml located at: %PCI%/jboss/server/default/deploy/jboss-web.deployer/server.xml Look for the string 8080. Change the port number to your desired...

OpenOffice 2.2 Defaults

I created an Windows installer for people who do not like to spend time doing the following after installing OpenOffice 2.2. 1. Filling in the first time "License/User" wizard. 2. Configuring Calc, Writer and Impress to save in MS formats. If you are recommending OpenOffice to your friends and do not wish to explain how to change the settings. Then this is the installer for you. http://files.openomy.com/public/jgngo/openoffice-2.2-defaults.exe All the installer does is copy 4 files (Setup.xcu, Setup-calc.xcu, Setup-writer.xcu, Setup-impress.xcu) to C:\Program Files\OpenOffice.org 2.2\share\registry\modules\org\openoffice\Setup. The xcu files have been configured to set the default file format to MS Office formats. The Setup.xcu serves to disable the first time user wizard. WARNING: It also deletes the Quickstarter from the Startup folder because I cannot justify it remaining in memory.

Migrating Moniwiki to MoinMoin

I had been using Moniwiki for our company for a while because the installation was quite easy as it was PHP based. However, I found out that document versioning didn't really work. It may have been a configuration issue but I took this opportunity to take a look at MoinMoin, as it was being used by Ubuntu and looked well supported. The server was running Debian stable and MoinMoin was in the repositories. Installing was simple using aptitude. Configuration was a bit more involved as it required copying and editing files. The new wiki site was pleasantly more responsive. The next task was to move the data in Moniwiki to MoinMoin. Upon inspecting the data repositories, I realized that Moniwiki stored the data in individual files with the WikiWord as the filename while MoinMoin organized that data with the WikiWord as a directory with the actual content under the revisions directory. I cooked up a quick script to migrate the data. I also ran the previous file through a 'tr' to...

N80 Software Update

I just did the Nokia Software Update for my Nokia N80 last night. It took 3 hours to download the 78MB update. It's now running the N80 Internet Edition. However, when I restored my previous backup, the new Internet Folder disappeared. Gizmovoip also responds with a "Unable to configure GizmoVoip" when I tried to run that. I'm reinstalling the firmware again and will synchronize instead of restore. I'll lose my SMS messages and will have to reinstall applications but I guess that's the price of having a nice VOIP phone.

Compact Calendar (Printable CEO)

A tool I use to visualize what to do for the year is David Seah's Compact Calendar. He provides an Excel worksheet which you can customize for your own use. Discussing project schedules with other people is also breeze when using this tool. You'll probably throw away your desk calendar once you start using this. Download the 2007 Philippine Version .