Tag Archives: Backup

When Servers Blow Up – Disk Images Save The Day

We rely heavily on our ownCloud server here on the farm. Be it keeping up with our finances or maintaining health records on ourselves and our animals, we couldn’t live without it!

Friday brought severe weather in Florida, and a power outage that occurred during that storm was very hard on some of our electronics. We lost 3 cameras out in the goat pen, plus a computer monitor, and most importantly, our ownCloud server.

Yes, we have house-wide surge suppression, and yes, everything that got blown up was plugged into a further surge suppressor and UPS! Still, lightning goes where it wants, and on Friday, it chose those items.

Enter today’s tale of recovery. You see, while setting up an ownCloud server from scratch isn’t all that hard, it is very time consuming. Getting the Apache web server running just the way you want it, with SSL properly configured can take hours. But, not when you can work with a disk image!

Once our ownCloud server was up and happy many months ago, we used a Linux utility already installed in most Linux platforms, to do a mirror image disk image of our ownCloud boot disk. That disk image sat on an external USB hard drive, just waiting for the day it was needed.

First thing to do was slap a new computer together from our vast stores of often ancient computer hardware. Next, take the drive you want to use for the new server and plug it into a USB drive adapter. Those are handy devices to have around, and are very inexpensive.

Plug your hard drive via the USB cable into a working computer, and then launch the Disks utility

Click on your Menu button, and select Control Center.

Control Center

Control Center

Then select Disks which will launch today’s useful software tool.

Disks Utility

Disks Utility

Here’s where you need to use caution. Make sure that the drive you have selected is the one you wish to write to, and not your current computer’s hard drive!

Select the drive you wish to write to, select the disk image you wish to put on that disk, and let ‘er rip!

Preparing for the restore

Preparing for the restore

Because the new drive was much larger than the original, you’ll notice the warming in the above screen grab. After the disk was written, I then used GParted to resize the Linux partition to use the entire available disk space.

Of course our ownCloud data directory is on an external drive to our ownCloud server, so once the new drive was written and installed into the new computer, all we had to do was boot it up, plug our data drive in and it’s like it never blew up!

So save yourself some grief, make that disk image of your ownCloud or NAS server now, so you have it when you need it!


Linux Tools: FSArchiver

If you have been following along at all, you may have figured out that I’m nuts about making backups of not only files, but entire partitions on my many hard drives here on the farm.

Today I want to tell you about a simple Terminal program that can create a complete image of any partition(s) and save them any place you’d like. The program is called FSArchiver

Head over to your Software Manager and do a search for FSArchiver, then once installed, you  can open a root Terminal window and start backing up!

fsarchiver backup tool

fsarchiver backup tool

I recommend you start your journey with this program by heading over to the official web site for FSArchiver. They have a great quick start page that will have you up and running in just a few minutes. You can find their site HERE

To speed things up, the first thing you’ll want to do is get the listing of all the available volumes on your computer. Open a root Terminal and type the following command:  fsarchiver probe simple

In my case, here’s the reported volumes on this particular computer:

FSArchiver volume listing

FSArchiver volume listing

Now that I can see my available volumes, I determine that I want to archive the sda2 partition, which is where my Windows 2000 partition is (don’t laugh!)

Again, from my root Terminal, I now type: fsarchiver savefs win2000.fsa /dev/sda2 and the archiving will start. Note that there will be no indication in the Terminal window that anything is happening, but give it time, eventually it will finish, and report the success or failure of the archiving. Note that at this time, NTFS file system archiving is experimental, but it worked great for my small NTFS partition.

What I really like about this software, is that you can do the backup on a running system, unlike some tools where you have to boot to a separate disk to do the backup, like CloneZilla.




Drive Imaging

Yesterday, we learned how to do a backup. Today, we’ll learn a different way to preserve your computer data.

Drive imaging is another way to bring your computer back from the dead. Unlike a regular backup, drive imaging can restore not only your personal files, but also your entire operating system as well. After restoring a drive image, your computer will look exactly like it did on the day you did the drive image!

The best way to do a drive image, is to use the Linux distribution called CloneZilla

Simply download the Clonezilla distribution, and do an .iso burn to a blank CD-ROM.

Clonezilla is what is called a LiveCD. You boot your computer using the Clonezilla CD-ROM.

Once booted up, you can then follow the on-screen instructions to make a 1 to 1, bit by bit image of your entire hard drive. If you have a dual boot system on your computer (on a single hard drive) then Clonezilla will restore everything, both operating systems and the Grub boot loader will be be imaged.

Clonezille is a great tool to use if you are upgrading your hard drive, say from a small 80 gig unit, to a larger, say 500 gig drive.

It’s important to note that after you image your drive, files added later will not be there, so it’s important to also do a rebular backup like we discussed yesterday!




Do You Back Up?

Linux is a very easy operating system to back up. All of your personal files are found in the Home directory. In a catastrophic crash, like a hard drive failure, if you have backed up the Home directory, getting everything back in working order is very simple and straight forward.

Backing Up:

There are several different software packages that you can use to backup and restore your files. We use Luckyback which can be found in in your Software Manager. Luckybackup has two modes – regular and superuser. Regular will allow you to backup your entire home directory, where your photos, music, documents, etc are located. Superuser mode will allow you to do backups for directories like the /var/www directory where your web server files are located.

After you install Luckybackup, the first thing you will do is create a backup job. This is simply selecting the source and destination for the backup. After this is done, you can do a dry run, without actually moving any files. This will help to make sure that the backup will be successful.

As to the destination, you can use a thumb drive if you  don’t have many files, or better yet, and external USB hard drive. After the backup, put the thumb drive or external hard drive away in a safe place.


When it’s time to restore a crashed computer, simply reinstall your operating system, remembering to also reinstall Luckyback, then open Luckyback and run restore!

Make sure you don’t open any applications, like your mail client or browser until after you do the restore. This will insure that directories and files that are created dynamically when you launch the application aren’t created.

If you a run web server on the machine to be backed up, and it uses a MySQL database, don’t forget to do an export of your database and save it to your backup drive too!

Luckybackup has saved our bacon more than once, and it can save you too!