Entries from March 1, 2012 - March 31, 2012

Sunday
Mar112012

Moving the BackupPC Data Directory to an external Hard Disk Drive

In Ubuntu 10.04 LTS the default install of BackupPC stores all the backups in the directory /var/lib/backuppc which is located on the main hard disk drive /dev/sda.  However, I wanted to store all my backups on an external USB hard disk drive /dev/sdb.  This post records what I had to do to get this to work.

Reformat the External Hard Disk

The external hard disk drive came with its disk preformatted as an NTFS file system. This file system does not support hard links which are critical for the efficient operation of BackupPC, so first we reformat the disk to EXT4 (a file system that does support hard links).

Display the partitions (I use parted rather than fdisk because its display is a bit clearer):

   sudo parted -l

Create an new /dev/sdb1 partition (here I use with fdisk because parted could not create EXT4 file systems):

  sudo fdisk /dev/sdb
     c (disable msdos mode)
     u (set units to sectors)
     d (delete partition 1)
     1
     n (create new primary partition 1)
     p
     1
     <Enter>Use default first and last sectors
     <Enter>
     w (Write out the new partition table)

Check the /dev/sdb1 partition exists (but the file system column is blank):

   sudo parted -l

Now we make the EXT4 files system:

   sudo mkfs -t EXT4 /dev/sdb1

Now check the partition is now EXT4:

   sudo parted -l

Install BackupPC

Now we actuall install BackupPC:

   sudo apt-get install backuppc

Set the password for account 'backuppc':

   sudo htpasswd /etc/backuppc/htpasswd backuppc

Point your web browser at http:/backuppc and log in as 'backuppc' with the password you have just set up. The BackupPC Server Status page should be displayed (it doesn't matter if there are some failed backups listed at the bottom of the page).

Copy the Data Directory Contents

Copy the BackupPC data directory contents to the external hard disk drive:

   sudo cp -r /var/lib/backuppc /media/usb0

And set its owner to 'backuppc':

   sudo chown -R backuppc:backuppc /media/usb0/backuppc

Check the new data directory is present and has the right permissions:

   sudo ls -al /media/usb0

And check its contents:

   sudo ls -al /media/usb0/backuppc

Set up a Symbolic Link from the Old Location to the New

Remove the old BackupPC data directory:

   sudo rm -r /var/lib/backuppc

And replace it with a symbolic link to the new data directory (note the order of the parameters is target path before link path):

   sudo ln -s /media/usb0/backuppc /var/lib/backuppc

Set the owner of the symbolic link to 'backuppc':

   sudo chown -h backuppc:backuppc /var/lib/backuppc

Check the symbolic link is present and has the right permissions:

   sudo ls -al /var/lib

And check that it links to the right contents:

   sudo ls -al /var/lib/backuppc

Restart the server (just to make sure everything reinitializes):

   sudo shutdown -r now

Point your web browser at http:/backuppc. The BackupPC Server Status page should be displayed. BackupPC is running with the data directory on the external hard disk drive.

Sunday
Mar112012

Bumblebee

A bumblebee, probably queen tree bumblebee, Bombus hypnorum (Hymenoptera: Apidae).  This species was first recorded in the UK in 2001 and is now quite common throughout England.

Photo taken in Whiteknights Park, Reading, UK, on 2012-03-10.

Saturday
Mar102012

Squirrel Skull

The skull of a grey squirrel (Sciurus carolinensis) with severely overgrown incisor teeth, probably the result of malocclusion arising from damage to the lower incisors. This condition would have made it very difficult for this animal to feed and was likely the cause of its death.

Photo taken in the Wilderness, Whiteknights Park, Reading University grounds, Reading, UK, on 2012-03-09.

Friday
Mar092012

Muscid Fly

A female Muscid fly, probably Muscina prolapsa (Diptera: Muscidae).  Note the orange bases to the antennae.

Photo taken in Whiteknights Park, Reading University grounds, Reading, UK, on 2009-05-24.

Thursday
Mar082012

Another Tachinid Fly

A Tachinid fly, either Exorista rustica (Diptera: Tachinidae) or a member of the Exorista rustica group of species.  Identification by Chris Raper here.

Photos taken Whiteknights Park, Reading University grounds, Reading, UK, on 2010-08-01.