I recently had a broadband outage. While I was waiting to be re-connected to the world, I started thinking about outages in general, and disaster recovery in specific. As I posted elsewhere I backup my computer on each and every day I use it, to two external devices. But what I hadn’t done so far was a test restore from the backup to prove that the system worked.
I know you can do an entire snapshot of your Linux box using Clonezilla, which is a free and open source equivalent to Ghost. But the time taken to generate a snapshot and, more to the point, to restore one versus the time taken to do a fresh install of Ubuntu on my PC seemed too great. My theory was I could do a completely new install of Ubuntu, restore my data and do the small amount of customisation I do to my system in less time than it would take to do a restore of an image and then do a data restore on top of that.
Back in the Windows world it was different. The time taken to install all of my applications added greatly to the restore process, and the customisations and preference settings for each one added further delay to the restore time. it was also a manually-intensive and therefore error prone process. Given those circumstance I did use to image my PC using Acronis True Image. But with Ubuntu because most of the applications I use are installed by default anyway there is no further time lost in getting those back on the PC. And as for the customisation or preference settings it should just be a case of copying the appropriate hidden folders from my backup into my home drive. Shouldn’t it?
I concluded that if there was a flaw with my back up process it would be better to find out now rather than when I’ve had a real-world disaster and need to get things back up and running fast. Time to bite the bullet. I re-installed Ubuntu and did a format during the process. Bullet well and truly bitten.
40 minutes later Ubuntu was up and running on my machine again. I’d given it the same name, gave myself the same user name, and used the same user password.
Obviously I had access straightaway to the stuff I have in the cloud, such as in Evernote. I copied my data back to my home folder: Documents, Music, Videos and so on. I fired up Firefox and logged into Firefox Synch, and retrieved all of my bookmarks and shortcut settings. I closed Firefox and copied the .mozilla folder from the backup drive to my home folder. Any file or folder whose name starts with a . is hidden. you need to hit Ctrl-H to toggle their visibility. I fired up Firefox again and it found all of my add-ons and their settings in the .mozilla folder.
I installed and started Thunderbird and then closed it down straight away. I copied the .thunderbird folder from my backup to my new home folder, restarted Thunderbird and all of my email accounts were there, with their settings and all of my email archives. Also the plug-ins I use in Thunderbird were all present and correct.
I was on a roll. Next: the same thing for FileZilla. Copied the backup .filezilla folder to my home folder, started FileZilla and it had all of my FTP accounts in it with their connection settings, passwords etc.
And so it went on. Application after application had their settings and data dragged back and that was that – they were restored and set up in just the way I’d left them. Once my applications were back on the PC I then set up things like RecollIndex in Cron, and sSMTP and I did some of the visual customisations to the desktop that I like, and that was that. Obviously things would have been a bit more complicated if I had multiple users installed on the system, but as far as single user system restores go, that was a doddle. It was the easiest system restore I’ve ever been involved in.
And believe me, I’ve done my share of them.
To help me locate an item of interest amongst the ever growing collection of documents, emails, photographs and other data files I have on my computer, I use a desktop search program. Desktop search programs create and maintain an index of the contents of your files. You can specify a word or phrase that you know is in the file and the program will display the list of files that match your search clue. You can preview or open the file from the list of matches.
A good desktop search program will go further. You should be able to specify the file types to include or exclude from a search, and which files and folders to ignore when indexing.
To be really useful the desktop search program needs to be able to burrow through the databases of other applications, such as the email store of Thunderbird, and index the data it finds there. (Actually the search in Thunderbird is very good on its own, but sometimes I need to search for something and see all matching images, documents and emails in one place.)
The program I’ve settled on in Ubuntu is called Recoll. It is very flexible, it indexes all sorts of files – and the search is fast. Recoll needs to have its index updated periodically to keep it in synch with the changing content of your files. There is a program called recollindex which updates the Recoll index. I didn’t want to have to remember to manually run recollindex, I wanted to find a way to have recollindex started automatically for me.
The answer to that was Cron.