Posts

Showing posts with the label Unix

Creating backups of your home folder

I don't think I have to tell you that creating backups is necessary. You never know how and when disaster will strike. To prevent loss of data I have been using the following strategy for a while: create a backup on a weekly basis to 2 disks on-site switch one of the on-site disks with an off-site disk (stored in a safe in a bank) Having an off-site disk is important. It helps you recovering from a real disaster like fire or theft. You could rent some online cloud storage to facilitate your off-site backups, but I think my solution (given the amount of data) is cheaper and faster. To create my weekly backup, I use the following script: #!/bin/sh # Author: Brice Burgess - bhb@iceburg.net # multi_backup.sh -- backup to a local drive using rsync. # Uses hard-link rotation to keep multiple backups. # Directories to backup. Seperate with a space. Exclude trailing slash! SOURCES= "/home/kenneth" # Directory to backup to. This is where your backup(s) will be st...

Fosdem 2012 ...

... the dates are set. February 4 & 5, 2012 ... yeah!

Restoring files manually from a mondo backup

As already mentioned in earlier posts, I uses mondo to create system backups of all my systems. By system backups I mean; create a backup of the live system, without any personal data. In short, this is a backup of everything except home folders. The home folders are backed up using rsync and external disks, but this is another story. Restoring from a mondo backup is easy; simply burn the images, put it in a cd drive and nuke the system (yes, this is a restore option in mondo :) ). If you just want to restore some files from the backup, without overwriting the whole system, there's an easy way to do this. Suppose you created an ISO a while ago and these are stored on some disk. First, you will need to mount the ISO as a loopback device like so: mount -o loop MyIso.iso /mnt The ISO is now mounted in /mnt . Now locate the file you want to restore (I was going to restore smb.conf ): $ grep smb.conf /mnt/archives/filelist.* /mnt/archives/filelist.11:/var/lib/ucf/cache/:etc:samba:...

Easy backups on Linux, putting it to the test

In an earlier post I was talking about how I've been using mondo as preferred backup solution for quite some time. However, I have never used it to restore stuff, since I've never broken any install before and hardware hasn't failed on me yet. Since I wanted to replace the smaller 10GB hard drive, I've installed in the Wyse, with a bigger 500GB one, this would be an ideal case to try and restore everything with mondo . So I created a backup of the 10GB drive with mondo to an NFS share on another PC (using the script posted earlier). Next, burned the resulting ISO to a CD and finally booted from the CD and interactively restored my data. mondo has 2 main restore modes; interactive and nuke. Since my new drive was bigger than the original drive, mondo suggested to drop to interactive mode, which allowed me to create a whole new partition scheme (which is nice). The only thing that failed was grub installing itself on the master boot record. I'm not sure why, maybe...

Easy backups on Linux

Ubuntu has been a fantastic operating system for my desktop and has been my preferred Desktop OS for more than 3 years now. The cool thing about Ubuntu is it's Debian based. So you install once and dist-upgrade to every new release without ever having to reinstall the whole thing. The downside is a dist-upgrade in Ubuntu sometimes fails leaving you with a very b0rken system. That's why I stick with LTS releases for now, because I have little spare time to reinstall my desktop every few months or so. Nevertheless there are brave people out there always keeping track of the latest, more or less stable, version and don't mind the dist-upgrade problems. Anyway if your install is broken after a dist-upgrade (or any upgrade) it's always nice to have a backup at hand. In search of the ideal, most flexible, backup tool out there I found mondo . So, people, stop asking for a backup tool for Linux on forums, this one will suite your needs. Unlike some other tools, mondo creates ...

My new pet project

Before I start telling about my new pet project, I must congratulate my 3 colleagues that joined me at the Ubuntu booth on this weekends Dipro fair. We managed to gather around €80 of donations from people collecting an Ubuntu (or Kubuntu) installation medium. Compared to an earlier fair I did, with roughly the same people, this amount of money is enormous. If everything goes well, this money will be transfered to the Belgium Ubuntu loco team for supporting their actions. Anyway, like any other Dipor fair, there were a lot of people trying to sell old computers and laptops for unreasonable prices, the most hideous cases, do-it-yourself-ink-cartridge-refill kits and mini keyboards only my kids can type on :) While strolling through the fair, however, a colleague showed me an interesting Wyse Thin Client. These terminals are normally used as a very lightweigt computer, accessing terminal services provided by some server running Windows or Unix. This particular device (a 9455XL ) was run...

Linux: Ubuntu 8.10 is coming

Just a quick post to tell the small amount of people tracking this blog that Ubuntu 8.10 is coming. The first beta's are already released. Gentlemen (or women), start playing :)

Linux: Some issues I had with Kubuntu 8.04

Whilst reinstalling my desktop and all the applications I wanted, these were the problems/issues I encountered. VMware does not work I use VMware to test drive upcoming Ubuntu releases and for running Windows XP. I still need XP for my GPS software on my PDA. I tried to install VMware 1.x and it failed when compiling the netwokr modules. This link solved my problems and I managed to compile the modules. When trying to run VMware, another problem appeared: /usr/lib/vmware/bin/vmware: /usr/lib/vmware/lib/libgcc_s.so.1/libgcc_s.so.1: version `GCC_3.4' not found (required by /usr/lib/libcairo.so.2) /usr/lib/vmware/bin/vmware: /usr/lib/vmware/lib/libpng12.so.0/libpng12.so.0: no version information available (required by /usr/lib/libcairo.so.2) /usr/lib/vmware/bin/vmware: /usr/lib/vmware/lib/libgcc_s.so.1/libgcc_s.so.1: version `GCC_3.4' not found (required by /usr/lib/libcairo.so.2) /usr/lib/vmware/bin/vmware: /usr/lib/vmware/lib/libpng12.so.0/libpng12.so.0: no version information ...

Linux: Impressions of Kubuntu 8.04 KDE 4 Remix

Almost 3 years ago, I decided do ditch my old PII Celeron and buy a new HP Pavilion Pentium 4. The Pavilion had Windows XP preloaded and it lasted about a week. Since that week, it has been running Ubuntu and I never re-installed it. I have been dist-upgrading the machine from Breezy (ah, those were the days) to Dapper. Since I like having a stable machine, instead of feature rich, "running latest versions of everything" machine, I've been using Dapper until yesterday. Since the early days of Linux having a "desktop environment", I have always been a big fan of Gnome. It looked right and has always served my needs. As a java developer, I use Gnome as the preferred desktop environment at work too. Using Gnome, or any desktop environment, hours and hours in a row, enables you to discover the less pleasant parts of it. So, after a year of developing on a Gnome desktop, I have come to dislike it. A few months ago, youtube was flooded with short demos on the new, upc...

Linux: Joy, joy, pleasure overload

Yes. Coming home today and browsing through the mail I received mad me a very happy man, despite of the rough week at work. Today I found 2 surprises in my mail: Revolution OS, the DVD . This DVD is a documentary on Linux and the Open Source movement. Yes, I do realize you can see this movie on-line but I just had to have a hard copy for myself. And yes, I do realize this makes me a real nerd :) 2 CD's with Ubuntu 7.10. The nice people of ShipIt send me a free copy of Ubuntu's most recent distributable for free. Guess this makes me a double nerd. Oh well, I don't care. You're all being jealous :)

Linux: Installing latest firefox and thunderbird on Dapper

I'm still using Ubuntu Dapper. Why? Because I don't want to mess a lot with this install and let a dist-upgrade trash it completely every six months or so. Trust me, I've done 2 or more dist-upgrades in Ubuntu and none of them went well. Anyway, I am still running Dapper and I'm proud of it. The only problem with this is that firefox and thunderbird shipped with Dapper have become very outdated. I wanted to try the webmail plug-in, but it only works for thunderbird 2. Damn :( Fortunately there are some kind people who also have an older Ubuntu install and created a script to easily install the latest versions of both firefox and thunderbird on any Ubuntu version. Cool eh :) The script is called ubuntuzilla and you need to run it as root. Not as a regular user, not using sudo. Use it at your own risk and make a backup of your mails before using the script!

Linux: Installing fluxbuntu (Gutsy)

Introduction I own an old Compaq Armada e500. This portable used to have 512 MB of RAM, but the other month, half of it failed on me and died. So, this left the portable quite useless. Running Ubuntu with Gnome is quite painful, because you spent most of the time waiting. Even the so claimed lightweight Ubuntu, Xubuntu, doesn't run as smooth as it should. The other week I came across a post on the dutch Ubuntu forums, talking about fluxbuntu . This Ubuntu version claims being more lightweight than Xubuntu, so I decided to take it for a spin. Installation fluxbuntu boots in a non graphical installer. If you ever installed Debian, this installer will look very familiar. I think Ubuntu's alternate install CD also uses this "ncurses" based installer. Although the installer is text based, installing fluxbuntu is not more difficult than installing any other distro using a graphical installer. It also has the same basic questions; what's your keyboard layout?, where do y...

Linux: Installing sun-java 6u2 the Debian way on Ubuntu Dapper

Even though the recent changes in Sun's licensing, for distributing the jdk as a package, allows Ubuntu to provide prepackaged jdk's, I couldn't find a package for my Dapper install. On the dutch Ubuntu forums there was someone asking for a package for jdk 6u2, so I decided to give him a hand. This is the procedure that will work on Dapper, Edgy and Feisty: sudo apt-get install java-package now edit: gksudo gedit /usr/share/java-package/sun-j2sdk.sh search this section: "jdk-1_5_0_" [ 0-9 ][ 0-9 ] "-linux-i586.bin" ) # SUPPORTED j2se_version= 1 . 5 . 0+update ${archive_name : 10 : 2 } j2se_expected_min_size= 130 found= true ;; esac ;; make it look like this: "jdk-1_5_0_" [ 0-9 ][ 0-9 ] "-linux-i586.bin" ) # SUPPORTED j2se_version= 1 . 5 . 0+update ${archive_name : 10 : 2 } j2se_expected_min_size= 130 found= true ;; "jdk-6u" [ 0-9 ] "-linux-i586.bin" ) # SUPP...

Linux: Upgrading Debian

In one of my last posts the other year I was complaining about my struggle fixing Debian after performing an upgrade while following the "testing" branch. Seems all the hassle I've been through, finally paid of. My upgrade to "etch" has been a very smooth transition. Since I was feeling adventurous, I decided to upgrade my vanilla kernel as well. The machine was running a vanilla 2.6.15.4 kernel which was becoming a little outdated. So I decided to take my chance compiling the most recent 2.6.22.3 kernel. Configuring and compiling was easy, but after a necessary reboot, iptables NAT and masquerading seemed b0rken. After googling a little bit, I discovered that the Netfilter people did a bit of refactoring in the modules and options necessary for NAT and masquerading. After enabling -> Networking -> Networking support (NET [=y]) -> Networking options -> Network packet filtering framework (Netfilter) (NETFILTER ...

pam_ccreds howto

This document is largely inspired by this link. The configuration contains a few flaws however and is not working for Ubuntu Edgy. First we need to install nss-updatedb: sudo apt-get install nss-updatedb Make sure to update /etc/nsswitch.conf : passwd: compat ldap [NOTFOUND=return] db group: compat ldap [NOTFOUND=return] db shadow: compat ldap Populate the cache by issuing: sudo nss_updatedb ldap Make sure nss-ldap doesn't search for the LDAP forever. Update /etc/libnss-ldap.conf : bind_policy hard nss_reconnect_tries 1 nss_reconnect_sleeptime 1 nss_reconnect_maxsleeptime 8 nss_reconnect_maxconntries 2 Check if this worked by unplugging the network and typing the following command: getent passwd Be warned, this might take some time. Now, install libnss-db and libpam-ccreds: sudo apt-get install libnss-db libpam-ccreds Update /etc/pam.d/common-auth : auth sufficient pam_unix.so auth [authinfo_unavail=ignore success=1 default=die] pam_ldap.so use_first_pas...

Sun ships Solaris 10 DVDs ... for free!

Image
For those of you interested in exploring the goodies of Sun OS, Sun is shipping DVDs for free . I came across this link _after_ downloading the whole CD set. Bummer :( I needed the CDs anyway because my Enterprise 450 does not have a DVD reader. Below are some images from Sun's site ... in case you're interested how this machine looks like.

Linux: Fixing authentication in Apache 2, after doing an upgrade

This is the second post on upgrading my Debian box to testing. Obviously everything was b0rken, even authentication mechanisms put in place for Apache2. Apache2 is using the local LDAP server for authenticating users on a subversion repository. Apparently, the people of Apache did some "refactoring" on the naming of their authentication modules. They renamed auth_ldap to authnz_ldap . Enabling this module instead of the outdated on, did not do the trick. I got the following error instead: [Thu Nov 02 19:07:26 2006] [crit] [client] configuration error: couldn't check user. No user file?: /svn/configs/!svn/act/ed8028d3-8254-bd4c-bc94-c3b93f8b97bb [Thu Nov 02 19:07:44 2006] [crit] [client] configuration error: couldn't check user. No user file?: /svn/configs/!svn/act/b2296e68-a114-8e49-aea6-bebfe78947bf [Thu Nov 02 19:14:57 2006] [notice] caught SIGTERM, shutting down I did some more reading and found this presentation very useful: TH21 - Using LDAP Authentication i...

Linux: Upgrading Debian woes (1)

So I decided to give my server, running Debian testing, an upgrade. Normally this works like a breeze. I have never encountered any problems during an upgrade, even though I am following testing. This time was different and things were very b0rken. This is about fixing my first issue: LDAP + libnss + udev. LDAP During the upgrade, the script didn't manage to create a decent backup of the running LDAP server. This LDAP is serving users for my home network and is also the backend for my Samba domain controller. So the LDAP was very b0rken. The only fix I could see was repopulating the entire tree, starting from a fresh, empty LDAP. To help me with this, I found this a very interesting and thorough guide. Since the LDAP is also my Samba backend I am using smbldap-tools to maintain users and such. So repopulating the LDAP wasn't such a big task. Lucky. udev What is udev? udev works entirely in userspace, using hotplug events the kernel sends whenever a device is added or removed f...