Friday, March 6, 2009

Backup on Ubuntu (Samba or Windows Share)

Intro
These notes are my reminder notes on how to use rsync for backup with Samba or Windows shares on your LAN.

Installing Backup Tools
The following tools are needed:
  • Samba file system (smbfs)
  • Grapical interface for rsync (grsync)
Install the tools with:
sudo apt-get install smbfs grsync

"Map" remote share
Create folder for mounting remote share:
mkdir /home/username/smb
mkdir /home/
username/smb/backup

Backup process
Step1: Mount remote share:
smbmount //samba_server_name/samba_share /home/username/smb/backup -o username=samba_username,password=samba_password

Step2: Synchronize folders
run Grsync, by click on Applications->Internet->Grsync


This happened to be working great for me. If you want to backup the whole home folder be careful to mount your samba share somewhere else (not as subfolder within home). Grsync is nice front GUI for rsync.
I am using this setup to perform daily backups of my Documents folder to the remote Samba share. Grsync can be used with a local hard drive or USB key without need to mount remote samba share.

Wednesday, March 4, 2009

OpenJDK and Sun Java (Ubuntu 8.10 64-bit)

Intro
By default Ubuntu 8.10 (64-bit) installs OpenJDK for JRE, plugins, and Web Start. Since there are some issues with OpenJDK (especially noticeable with graphics, Swing, and fonts) the suggestion is to replace it with Sun's version that is not open source. Adding Sun Java from Partner repositories did no do a job for me as plugin and web start were not available. Addiong the package ia32-sun-java6-jre solved issue with Web Start (with 32-bit web start), but applets still did not work.

Fix
  • I completely removed OpenJDK and Sun Java installed from repostiories.
  • Then I downloaded the latest (in my case JDK, you can go with JRE) from Sun's website. I selected Linux x64 architecture.
  • In terminal I ran:
    sudo bash jdk-6u12-linux-x64.bin
  • Then I moved the newly created folder to /usr/lib/jvm
  • Since trying to run java command would not be found. I ran the following:
    sudo update-alternatives --install /usr/bin/java java /usr/lib/jvm/jdk1.6.0_12/bin/java 1
    sudo update-alternatives --install /usr/bin/javaws javaws /usr/lib/jvm/jdk1.6.0_12/bin/javaws 1

  • There was no need to configure alternatives for java since there was no other Java installed. If needed, this can be done with:
    sudo update-alternatives --config java
  • To enable plugin in Firefox I needed to do the following:
    sudo ln -s /usr/lib/jvm/jdk1.6.0_12/jre/lib/amd64/libnpjp2.so /usr/lib/mozilla/plugins/
  • Restart Firefox. It should be finding 64-bit Java plugin on your Ubuntu 8.10
  • Only other thing I needed was to tell Firefox to run /usr/bin/javaws when it downloads Java Web Start programs. When prompted to download, click on "Open with" and navigate to /usr/bin/javaws. That should do it.
Comments
If I am following what I just did everything should be 64-bit version Java now: JRE, JDK, Java Web Start, and Java web browser (Firefox) plugin. Any additional suggestions or feedback are welcome.

Tuesday, March 3, 2009

Migrate Evolution Data from 8.04 to 8.10 Ubuntu Desktop

Intro
I am installing 64-bit Ubuntu 8.10 on Dell Vostro 220s. Everything is going "smoothly" so far. However, when I tried to migrate my email data by restoring Evolution backup, Evolution cannot start after import.

Fix
I found a simple fix for it on the net:
  1. Delete everything in your ~/.evolution folder (/home/yourloginname/.evolution)
  2. Start Evolution and import Evolution data by click on File->Restore Settings, un-check the option to start Evolution after restore.
  3. When restore is finished, temporarily rename ~/.evolution to ~/.evolution.bak
  4. Now start Evolution. It will re-create a new ~/.evolution folder and open with empty mail data. Close it.
  5. Delete ~/.evolution folder, and rename ~/.evolution.bak to ~./evolution
  6. Start Evolution again, it should work and find the data you imported.
Deleting files and renaming folders can easily be done from Nautilus (click on Places->Home Folder). Select an option to Show Hidden Files (in Nautilus click on View->Show Hidden Files, or CTRL-H) .

Sunday, March 1, 2009

No Title (yet)

Two-three months ago I trimmed the trees in the back and front yard. Kept few "sticks" in a vase. Some golden wiping willow, poplar (hybrid), and purple ash. They all grew roots.

Now, I decided to move two into a separate "bowl" kind of like Bonsai deal. Trimmed the roots little bit. Not sure if it is going to work though. I put only few pebbles, sand and just a little bit of low quality soil from my front yard (everything dies there, or turns Bonsai).