Showing posts with label Backup. Show all posts
Showing posts with label Backup. Show all posts

Friday, 30 May 2014

Backed Up Or Hacked Off?

One of the problems of continually changing your operating system is remembering what software and applications to restore. You may recall that back in 2011 I settled on syncing to an encrypted pen-drive using GRSYNC as my strategy: now that I'm storing financial data in GnuCash, I guess it's time for a new backup.

This means installing both Grsync & EncFS. No problem in Mint16: you can use the software manager (Menu > Administration > Software Manager) or Synaptic for both packages!

I really must remember to backup more frequently, after all, disaster is only one upgrade away!

Sources & References:

Thursday, 18 August 2011

Implementing Plan C

With the arrival of my brand new 32GB usb drive this morning, I thought that it was time to take my own advice and implement Plan C of my backup strategy. However, as usual things didn't turn out quite as I expected!

My initial plan was simply to create an encrypted directory on my flash drive and copy my backups across the network. However, copying large compressed files from network storage to usb (via pc) wasn't successful and I found Ubuntu reporting errors - so, I modified my plans (let's call it Plan C.i) to replicate the backup using SBackup. Unfortunately, that didn't work either - SBackup couldn't access the encrypted directory so I had to think of a Plan C.ii!

When I first started thinking about a backup strategy, one of the options that I considered was, rsync: however, I abandoned this option because it was just too complicated (for me) at the time. rsync is a command line tool - it's manual stretches to 61 pages when printed to file and it's not a particularly forgiving read! Fortunately, there is a graphical interface (Grsync) in the Ubuntu Software Centre that makes configuring a backup a little less intimidating and, when coupled with some excellent pointers from The University of Auckland, getting a working backup onto a USB drive is reasonably painless.

So, I now have copies of my essential files encrypted and saved to a portable disk: Plan C has been implemented. Given that I probably won't be automating this process (I'll still have to mount the USB drive and decrypt the directory whenever I want to refresh my backup), I kept the backup to absolute essentials only - documents & configuration files - but it is a working solution for disaster recovery.

Sources & References:

Monday, 25 July 2011

Plan C

Given my views on the cloud, I've been thinking about alternatives to uploading data backups to third-party servers.

In common with other types of memory, flash memory has seen a significant fall in price over recent years and large usb flash drives of 64GB can be had for under £70 (or as little as $90 if you're lucky enough to live in the USA). Flash drives are also small and portable, making them an ideal format for keeping data backups close at hand and separate from the data source.

However, size can also have its disadvantages: flash drives are easily misplaced or stolen, so keeping data secure, even if it should fall into the wrong hands, is of paramount importance.

The good news is that it's easy to create an encrypted directory on a flash drive using free encryption tools readily available from the Ubuntu Software Centre: just install EncFS & Cryptkeeper and you're good to go!

To create your directory:

  • Insert your usb flash drive & and it should mount under the /media/ directory.
  • Click the Cryptkeeper icon in the systray and select the New encrypted folder option.
  • In the Create a new encrypted directory dialog, select the usb drive from the Places menu and type a name for the new directory in the Name: text box.

  • Click Forward.
  • Enter & confirm a password for the directory and click Forward.
  • The directory should be created and mounted.

To import the encrypted folder on another machine:

  • Insert your usb flash drive & and it should mount under the /media/ directory.
  • Click the Cryptkeeper icon in the systray and select the Import EncFS Folder option.
  • In the Import and Encfs encrypted folder dialog, select the directory with a name ending with _encfs and then type a name for the mount point in the Location: text box.

  • Click the Forward button.

At any other time you can mount the encrypted directory by inserting the flash drive, clicking the Cryptkeeper icon, and selecting the checkbox next to the directory name. You'll be prompted for your password and your file browser will display the directory.

Now you can store data in the directory without the need to encrypt individual files. It is worth pointing out that flash drives have limited life-spans so it may even be prudent to have a Plan D!

Sources & References:

Tuesday, 22 March 2011

Drastic Action

I've been fighting with sbackup again!

I spent a large part of yesterday trying to get sbackup to work on my laptop and failed! However, there are a couple of good things to come out of my struggle:
  • It seems that my test machine is more important to me than I'd realized and is now worthy of being backed up.
  • Finally, I have been forced to evaluate my backup policy for all of my machines.
  • My DELL Inspiron 1501 runs Ubuntu 10.04 LTS!
That's right, my little DELL (a machine that could barely cope with Microsoft's Vista OS) runs Lucid Lynx. Moreover, it doesn't just run 10.04: it copes admirably with the demands of Compiz, AWN, and visual effects! Now there's a revelation.

However, if I'm honest, my discovery was more desperation than investigation. I had tried manfully to get sbackup to connect to my network drive and even tried mounting the drive permanently but the application simply wouldn't connect for incremental backups using Karmic. So, I hit the update button.

I fully expected to be restoring Karmic this morning, but the DELL has demonstrated once again that I have underestimated its capabilities and, more importantly, overestimated the demands of Ubuntu. Now, not only is the machine running Compiz, AWN and visual effects, it is also backing up to my network drive and emailing me a report on completion: all with free software that is freely available!
"Ubuntu still is and always will be free to use, share and develop. We hope it will bring a touch of light to your computing – and we hope that you'll join us in helping to build the next version too."
Source: Ubuntu.com About Ubuntu
Sometimes I have to remind myself that Canonical provides Ubuntu to the world for free and that this operating system is not just comparable to the commercial alternatives but is, in many ways, superior!

Sources & References:
Ubuntu.com About Ubuntu

Thursday, 24 February 2011

The One?

I've been investigating Ubuntu One. The beta version of Ubuntu One was released in 2009 (May 13th 2009, to be precise) and the client software has been part of the Ubuntu OS since Karmic, but I've only just got around to seeing what it can do!

Canonical says of its service that:
"Ubuntu One is your personal cloud. But it's not just about syncing files — whether you need to access your contacts, notes or bookmarks from any computer or the web, enjoy your favorite music from a cloud integrated store or stream your entire collection to iPhone and Android mobile phones — we've raised the bar on personal clouds."
Essentially, it's a web-based storage facility that comes with 2.0GB of free storage (for the basic package) and allows users to buy additional cloud space: each additional 20-pack (20GB) costs $29.99/year.

It all sounds great, doesn't it?

Unfortunately, the hyperbole doesn't quite match the reality. For instance, one of the features of Ubuntu One is that users can synchronise contacts across their registered computers - who wouldn't want to do that? However, in order to synchronise contacts users must be using the Evolution message client (not much help if you're a Thunderbird user) and
Evolution contacts will currently only sync in Ubuntu 10.10 (Maverick) or higher users. Ubuntu 10.04 LTS (Lucid) users should see our status page for updates on getting contacts syncing again in that version of Ubuntu. Source: Ubuntu One Wiki FAQ
Which is no good to someone who runs 10.04 on his desktop and 9.10 on his laptop! Never mind, perhaps I'll have more luck with Bookmarks - at least that caters for Firefox.
"Currently, you need to be running Ubuntu 10.04 or higher and Firefox 3.5+." Source: Ubuntu One Tutorials/Bookmarks
Oh dear, not much luck there, either: it seems that I can sync my desktop bookmarks to my desktop!

I'm similarly disappointed that Windows Mobile (phone) isn't supported. OK, I can understand the iPhone/Android link to Unix, but the argument against including WinMob devices fails now that a Windows version of Ubuntu One has been released to beta testing. After all:
"It is a reality that many Ubuntu One users operate in a mixed environment of operating systems. They may prefer to use Ubuntu at home but are required to use Windows at their office or school. Perhaps they occasionally use Windows for an application that is not available in Ubuntu. Whatever the reason, we want to make it easy for anyone to enjoy our services on any platform." Source as linked above: emphasis mine!
Is it really so difficult to believe that not every Linux user has an Android phone?

One might argue that, once Canonical get the bugs sorted and makes Ubuntu One backwards compatible with its own operating systems, this is going to be a great service. Moreover, the first 2GB are free: what more can anyone ask for? But, not so fast. Today I did a full mirror of my desktop: backup size (compressed) was around 30GB which would require two 20-packs. That's $60/year (give-or-take) and a quick Google suggests that I can get 50GB of storage for nothing!

Tuesday, 22 February 2011

Back to Backup

Actually, I hadn't figured out the what after all! My backup scheduled failed once I'd shut the system down and incremental backups never happened.

That's the bad news: the good news is that I've fixed and tested Simple Backup and I've got it working. The new features include:
  • The latest version of sbackup (sbackup 0.11.4)
  • A working (tested!) schedule
  • Password protected destination directory
  • Email confirmation of backup
  • Confirmation notifications during scheduled backups
Here's how I did it:

Preparation and Installation

The easiest way to install the latest version of sbackup is via the Synaptic Package Manager. I find this method much easier than compiling code and building dependencies manually.

First, I had to remove the existing version of sbackup on the system; installed from the Ubuntu Software Centre. From a terminal:

sudo apt-get purge sbackup

The purge option removes both the software and the configuration files (because I wanted to configure the new build of sbackup from scratch). Had I used, sudo apt-get remove I would have left the configuration files on the system and these files are used by subsequent installations.

Once the original installation had been completely removed, I could add the nssbackup-team repository to the software sources:

sudo add-apt-repository ppa:nssbackup-team/ppa

Ubuntu automatically downloads the security key:
"Your system will now fetch the PPA's key. This enables your Ubuntu system to verify that the packages in the PPA have not been interfered with since they were built." Source: nssbackup Repository

Next was to update the packages in the Synaptic Package Manager.

sudo apt-get update

I opened Synaptic Package Manager to find the latest version of sbackup.


Typing sbackup in the search box and marking the sbackup package for installation is all that is required. The package sbackup-gtk was added automatically.


Clicking the Apply button on the main menu installs the latest version of sbackup (v. 0.11.4). Strangely, Simple Backup is no longer listed in the System > Administration Menu: it's now to be found lurking in the Applications > Accessories Menu and the Applications > System Tools Menu. If you want to run non-technical backups without schedules, use the first option: however, to schedule backups you need root privileges, so you must use the second option and type in your password when prompted. I suggest that you edit your menus to hide the version that you don't want to use!

Starting sbackup for the first time generates a warning that no profile has been found (to be expected as I purged the configuration file!): sbackup creates a default profile if one is not available.


I closed the warning dialog in order to begin configuring sbackup:


The first tab allows configuration of the frequency of full backup events and any compression or division of the backup files.

The Include tab allows you to specify what files are backed up. The default setting for the non-administratve mode is /home/usr/ which is likely to be a substantial directory. For the Administrative version, the options are:
  1. /var/
  2. /home/
  3. /urs/local/
  4. /etc/
I've chosen to test this version using a simple directory containing a few simple text files.


In the non-administrative mode, the Exclude tab is blank by default. However, you may wish to exclude temporary and cache files or excessively large files (movies, perhaps). The administrative version, excludes:
  1. /media/
  2. /var/run/
  3. /var/cache/
  4. /var/spool/
  5. /var/tmp/

Which is much more sensible!

The Destination tab allows you to choose where your backup will be stored. The default is the /home/usr/.local/share/sbackup/backups directory: however, you can navigate to a local custom backup location or select the remote site option.


Interestingly, you can't type the location directly into the remote site dialog box: you must click Connect... in order to access the set remote target dialog. Here you can type in your server/host settings and security credentials (login and password) and also test the availability of the remote directory.

Warning: the non-administrative mode does not schedule backups and the Schedule tab is greyed out. However, Administrator mode facilitates both simple schedules or more complex cron jobs and also allows you to specify manual backups only (via the No scheduled backups option).

The Purging tab allows you to specify simple cut-off or logarithmic purging.

The final tab is a nice feature not available on the version from the Ubuntu Software Centre: it allows you to send a report of the backup activity via email. The output (in the form of a simple text document) is embedded in the email rather than being sent as an attachment.

There are also a couple of other nice touches with the most recent version, including notifications. One as a pop-up message at commencement:


The second as an icon on the panel:


One of the problems with the version from the Ubuntu Software Centre is that errors are dropped silently: in other words, if the backup fails you won't know that you have a problem unless you check your backup destination on a regular basis. These notifications (coupled with the email) negate this difficulty.

I've tested the system on my DELL Dimension: now all that I need to do is install and configure the latest version on my laptop and decide what to backup!

Useful Resources:
sbackup stable repository
FAQs for sbackup

Sunday, 20 February 2011

I've Figured out the How, Now for the What!

I really don't know why it's taken so long. My friends in the various discussion forums that I've contributed to over the years are accustomed to me berating them for not doing it and I know from bitter experience that it's better not to get caught with one's pants down: so I'm embarrassed to admit that recently I haven't been making regular system and file backups!

The reason for my slovenly behaviour? I couldn't figure out how to get Simple Backup to write the backup to a remote network drive!

My early attempts to implement a backup strategy were thwarted by my difficulties with Samba and recently my attention has been monopolized by upgrades and laptops. However, today I set myself the goal of getting my backup strategy back on track. As always, it took an awfully long time to realize that it shouldn't have taken such an awfully long time.

Having fixed Samba (not that it was really broken!), I thought that pointing Simple Backup to my chosen destination directory and telling it how often to backup my files was all that was required. However, every time that I pointed to an existing directory on the network drive, Simple Backup demanded my login and password: that's not ideal if you want to automate a backup process. I tried mounting the drive without success and even looked at alternative solutions; including using rsync via the terminal.

Ultimately, it proved easier to start from scratch and, using Windows Explorer (on a Vista machine), I created a new CIFS share on my network drive called (in my case) UBUNTUBACKUP. In this share, I added two additional directories, one each for my laptop and desktop.

I had to set some pretty liberal read/write permissions, but the vanilla directory did the trick.


It's worth noting that, despite the inference to the contrary on the Simple Backup Help Page you don't have to use a secure shell (ssh) or file transfer protocol (ftp): Samba (smb) works just fine!

Moreover, you don't have to use the ip address of the remote machine: NetBIOS names also work.


After assigning the destination addresses in both Ubuntu machines, I rebooted to test whether the login/password issue would return: it didn't and subsequent test backups showed that I had finally managed to achieve the simplest of tasks! It seems that the point that I'd missed is that writing files to another machine on your network requires the destination directory to be a shared directory with permissions that are liberal enough to allow access for a remote source.

Now that it's working, all I need to do is to figure out what is worth saving and how often!