Sunday 24 July 2011

Your only as good as your last .... a guide to using Virgin Backup with Ubuntu

They say man can overcome many things but not the weather.
A recent storm decided to make my trusty Ubuntu server non functional, also taking out an unused but handy Athlon 3200 system which was actually turned off at the time (PSU gone I think), the Athlon is just sitting there until I can decide what to do with it (it's got a couple of gig of Ram, Geforce 5950 Ultra and about 1TB storage but is far too much computing for linux so I simply do all my work on a laptop). Anyway the server drive was damaged and I think the system board as well.

Fortunately I managed to coax a Clonezilla backup from the 160gb drive to a 250gb drive on a different system, this being linux I just needed to power it up and everything is back working fine - had this been Windoze then I would be getting a mountain of error messages about network cards being different, graphics changing etc etc. but it's not Windoze so I didn't and it was nothing more than copying the disk and powering up in an alternative system.

Anyway, I digress a little here, the issue made me think a lot about backups, although I have an external USB drive serving as NAS and also a folder on the server I thought, what if the lightning took out the NAS as well ?

Being a Virgin media customer I have access to their online backup and storage facility, however the first hurdle in using it is the application does not work in linux !

It's not the end of the world though as a little bit of thought and I can easily do something .....
Look at the Ubuntu cloud as an example, you have a folder (called Ubuntu One) on your system, put anything in there and it's replicated to the Ubuntu cloud, go to your other systems and look in the Ubuntu One folder, there's the files and so on.

This system gives me 1gb - not enough for all my pics etc but gives me an idea.
As I had now gone from a 160gb to 250gb drive I will have a fair size partition to play with.
Using Gparted or similar, I formated the partition to FAT32 - I need a partition that Windoze can see otherwise I would be using ext2 or similar. Anyway I format it up and give it a snazzy name, in  this case "CLOUD".
Using the Ubuntu sharing option I create a share as I want everyone in the family to be able to drop files here and access them.



As this folder is FAT32 the share can be created by a normal user account, if your permissions won't allow you could elevate nautilus to apply the permissions (open a terminal and type "gksu nautilus" but very very naughty to run nautilus as su).
If you check the folder you should see the share icons on your local browser.
(Just for info NAS is ext3 and shared by user account permissions so it does not show the global share icon)


OK we now have a share called "CLOUD" with a FAT32 partition (no permissions needed for users) and I check I can see it on the notebooks etc.


All OK so far..

I have Wine installed so pop to Virgin, log in and go to My apps

Then I download the backup program.


Installing it is simply a case of right clicking and open the file with Wine.
Let it install, I also let it install a desktop Icon, clicking this will automatically launch Wine to run the program.

It's just a case now of telling Virgin backup you want to backup selected folders, in this case I pointed directly to the linux mount point /media/cloud.
(Wine mounts drives up as Windows letters so the linux file system is Z: in this case, it's easy enough to look around for the folders you want).





I will make a full backup first then look at scheduling backups (perhaps midnight or similar).


Now for anyone wondering about stuff like Internet favorites etc.
You have lots of options.

Suggestions (and these are not exhaustive).
  • Create a symbolic link to your Evolution or Thunderbird folder, back that up with Virgin backup (you can't normally see the linux folders as Windows considers them hidden or can't display them).
  • Export your email account regularly to the replication folder i.e "Cloud".
  • For Firefox/Chrome, enable sync with other computers - your favorites etc are replicated anyway.
  • Create a symbolic link to your mozilla or chrome folder and save as before.
At the moment I've just created a 90gb partition, shared it with everyone and enabled Virgin Backup for that partition, as you can probably see by my folder listings in the images I could select lots more folders etc but this was just an exercise in doing one specific thing.
The entire family can now have photos etc backed up and most people would probably need several gb of storage, the photos folder I have created is 168gb and that's just photos.

In the time it took me to write this blog entry I have done all the steps live, nothing was complicated - I would rate this as suitable for all Ubuntu users and novices and total time from start to end (including writing this blog - which in fact took longest) was 30 mins.
Already I have 300mb of files backed up so alls well.

For those wanting a NAS box with some flexibility, don't forget to look at FREENAS and even better, CRYPTONAS - the first lets you use an old PC as a full NAS solution but offers much much more, streaming media to Xbox, PS3, Ipod, DHCP, user access, quotas - the list is vast. Cryptonas is the same but with your NAS folders encrypted.

*** Update ***
I'm not a great fan of shared folders in the windows sense as linux uses more implicit permissions than Windows so I made a change to mount the drive with fstab so it mounts on boot up.

in a terminal type "mount" to see your drive allocations, in this case CLOUD was assigned to /dev/sda3

It's just a case of mounting the drive with a pseudo name and with the right permission flags.

/dev/sda3  /media/CLOUD    vfat         rw,iocharset=utf8,umask=0000 0 0

This mounts the drive as /media/CLOUD with fat file system, read/write etc etc.
It's a small change but I prefer to mount drives with fstab when I can rather than using a Samba share for Windows compatibility.

Either way the Virgin backup solution works well enough to back up significant files, I find sometimes it's quicker to force a refresh by going to the "select files" bit and clicking the CLOUD drive, when I save it the utility then does a backup of the new files.
I also find it reduces CPU load by minimizing the program when it's running (or just close the main screen, it carries on running in the task bar anyway). The PC I'm using as a server has a very low power graphics card (it doesn't need much for a server) and when this program is running CPU usage appears to go High when the utility is being redrawn all the time, switching to minimize reduces this load on my machine.

I've also tested the clean up function, if you delete files then this checks the system and backup locations then offers to delete the files. For approx 30gb of files it took about 4 minutes to scan through the list.

Enjoy.

No comments:

Post a Comment