Tag Archives: debian

Backup/Restore remote disk images.

There are occasion when backing up data is not enough. You may want a snapshot of your whole system. There are some great tools out there like Clonezilla, which in turn uses partdisk, or Ghost if you don’t mind closed source. But you can do this using tools almost certainly available even in the most minimal of linux installs.
Caveats:
  • The image is easily restorable to the hardware it was created on. If you restore to another computer it will create unexpected issues. Usually fixable by creating a new initrd
  • The partition sizes are fixed and must be restored to a harddrive of equal or larger size.
  • dd creates a byte level copy of your harddrive, empty space is included in the backup. Without gzip a 160GB disk will create a 160GB disk image. With Gzip the image will still be very large.

Backup image to another Linux machine

If you have a Linux workstation with a large enough hard-drive you can simply backup and restore across the network. You will need root access to both boxes. Netcat is also available for Windows and Mac.

1. On the Destination Where you are storing the backup

In this example /dev/sda is the harddrive you want to backup/restore. Make sure you choose the correct harddrive.

 # nc -l 1010 > harddrive.img.gz

2. On the source computer The machine being backed-up

# dd if=/dev/sda | gzip -cf | nc -q 10 xxx.xxx.xxx.xxx 1010

Restore image form another Linux machine

1. On the Targe The machine you are restoring to

  • You will need to boot into a live image, I suggest Ubuntu, from USB or a CD.
  • From the now booted, live operating system:
    # nc -l 1010 | gzip -dcf | dd of=/dev/sda

2. On the Source machine The machine with the image saved

# nc -q 10 xxx.xxx.xxx.xxx 1010 < harddrive.img.gz

Simpana, Galaxy and Debian

This post is not particular generic and will only affect a few, but I will write it because the problem caused me huge frustration, and much time was wasted.

We currently use CommVault for backup and the Galaxy agent to make it work with Linux. I had a freshly installed Linux box which simply would not back up. The Controller and agent could communicate and there were no errors raised on either. Every time a backup was run, the scan would work, but as soon as data transfer was ready a communication error was raised.

It turns out that a clean install of Debina/Ubuntu adds an entry for your FQDN which point to 127.0.1.1. This is included for machines which swap networks and possibly hostnames form time to time (think laptops) so app suites like GNOME still work. It is also, in my opinion, stupid.

This entry was breaking Galaxy. I can only guess what was happening as it is  a closed source suite. But I think at some point in the backup process, even though communication is already happening, the agent gives the Controller the IP address to talk to. As the hosts file had a pointer to a localhost IP, this IP address was handed back to the Controller. and everything breaks.

So simple lesson, if you have a Debian/Ubuntu machine with static networking, replace the 127.0.1.1 entry in /etc/hosts for the FQDN to the real IP address.

Lenny, Icedove and teeny tiny fonts

You know the font situation on debian and gnome isn’t terrible in lenny. Actually it looks fairly decent. Until you load icedove (thunderbird).

The fonts are teeny, pixelated and hard to read. Luckily it is a very easy fix.

Open icedove, go to “Edit -> Preference -> Advanced -> Config Editor

Change the value for “layout.css.dpi” from “-1” to “0”

Restart icedove

Moving host

I am thinking of moving host again. I have no issues with dreamhost, but I have been playing with the rackspace cloud, and I like it.

I can have my own virtual machine, lowest specs, for abut the same price as dreamhost each month. And since it is my own box I can do whatever I like with it.

If this site got more hits, and I had to increase the specs, dreamhost would be cheaper, but no one comes here so rackspace will work super.

More importantly this lets me setup a vpn server outside of Australia. While I find it very unlikely that I will ever go to a site banned by the government’s filtering scheme, my protest is to simply bypass it.

http://nocleanfeed.com/

The move will happen over the next few weeks as I find time to install wordpress on debian and get it configured and hardened. The DNS will be staying on dreamhost, so I doubt any changes will be noticed.