Partition Images with qt4-fsarchiver.

Write tutorials for Linux Mint here
More tutorials on https://github.com/orgs/linuxmint/discu ... /tutorials and (archive) on https://community.linuxmint.com/tutorial
Forum rules
Don't add support questions to tutorials; start your own topic in the appropriate sub-forum instead. Before you post read forum rules
Post Reply
viking777

Partition Images with qt4-fsarchiver.

Post by viking777 »

Over on the Community website I created an 'Idea' that qt4-fsarchiver could be incorporated into the MInt iso's in order to facilitate zero knowledge disaster recovery directly from the Mint installation medium of your choice. In other words, you break your system for whatever reason and, as long as you have an image from before the breakage, you simple restore it with your existing Mint dvd/usb medium and carry on as if nothing had happened, no tearing out your hair searching google, no agonising waits for someone to answer your question on the forum, no other tools to download - just restore and go. I have been doing this for years and so have a lot of others it really just makes a lot of sense. One of the criticisms levelled at that idea was the lack of a tutorial on using the software. They do exist thanks to such people as Gerd50 and ukbrian et.al, but apparently it was felt these were not clear enough or too old, so I was asked to do an updated one myself, here it is.

Qt4-fsarchiver (which I will abbreviate to qt4 from now on) is an imaging system similar to Symantec Ghost or Acronis True Image, ie it is a simple gui based system restore solution, unlike clonezilla, partclone etc which are basically command line tools and also unlike ghost and true image in that this is open source and free to use. Moreover it is installable unlike redobackup for example that only runs from a live cd. This factor is not important if you only have one Linux distro because, in that case you would be better running from a live cd anyway and redobackup will probably do just as well, but it is important in the context of my 'Idea' in that it can easily be incorporated into the MInt iso.

So how to use it. Launch qt4, it will ask for your password and after a few seconds scanning your system it will present you with a screen like the one below, but without the red letters that I have added as a part of the tutorial.
desktop.png
The purpose of the 3 red letters is to illustrate that the information required here is all you need to know to use this software - ie, just about nothing!
A= Existing partition ie. What do you want to image.
B = Backup Directory ie Where do you want to put it
C = Name of backup - you don't even need to put the date, it does that automatically.
And that is it, press Save Partition and wait.
All the other buttons and settings in the top two thirds of that screen are options that you can play with if you want to, but don't necessarily need to touch if you prefer not to.
The bottom third of the screen is just a fancy progress bar, this is what it looks like part way through:
qt4-fs2.png
In this particular case I have imaged sda2, my ubuntu partition, which contains 4.9Gb of data and saved it to sdb1 my external hard drive. The image took 10m24s and the image size was 1.6Gb, about one third of the original.

Here are some notes about imaging.
You can image ntfs partitions, but it is considered, according to the writers as 'experimental'. They therefore say you shouldn't rely on it 100%. I don't have any ntfs partitions to test it on so I don't know for sure. It does not image fat32 partitions. It is basically a Linux solution not a windows solution.

You can do 'live' backups ie. image the partition you are running from but in this case it warns that any files that change during the course of the backup will not necessarily be backed up as you might want them (so if you want to do this, do not use the machine whilst the image is taking place). I have personally done a live backup with qt4 and restored it and could find no problems with the restored image - YMMV :) However you cannot write the backup image to the same partition you are backing up, it has to go elsewhere. Imaging from a second distro or live medium should be considered preferable.

Qt4 can make images of folders as well (it is a different screen, not shown here) but there are better solutions out there for this such as mintbackup, luckybackup etc. These use incremental backups qt4 does not. It can also image mbr's pbr's and gpt partition tables although I have never tried restoring any of these.

My backup took only 10 minutes, but the partition I am imaging is a / partition that does not include /home. I keep that on a different partition and use a different backup solution for that due to the reasons given above. If you only have one partition then your backups will take much longer and will be much larger depending how much you have in your /home folder. It is not really a good solution for this case unless you are very patient, you really need a separate /home.

Images can be made to a separate partition (eg, /home if that is separate) any external device, usbkey, a network, but not directly to a cd/dvd (as far as I know) if you want that then you would have to write it to an internal drive first and then burn it to cd/dvd with brasero etc.

So that is imaging, what about restoring? Even easier really, just click the 'restore' radio button then there are only two choices to make:
Existing partitions = where to restore to.
Backup File = where to restore from.
In the image below I would restore my latest ubuntu image back to its former home, sda2. It is possible to restore to different partitions although I haven't tried it myself and it is also possible to restore to a smaller partition than the one you originally imaged. The only proviso is that the size of the partition you restore to must be as big or bigger than the original amount of data on the partition (in my case the partition restored to must be 4.9Gb or above).
qt4-fs4.png
Restores are very quick, typically about 3 minutes. I have used it many times, it has always worked and always restored a bootable, working distro for me. Of course you need to keep the images up to date (I do it once a week) or otherwise you may have a lot of updates to install that have taken place since your last image, but that is the case with all backups, the only thing worse than an old backup is a non-existent backup :lol:

I don't suppose it is very likely that my community site idea will be accepted, so in the event that you are interested in this program, you can download an installable .deb file from here:
http://sourceforge.net/projects/qt4-fsa ... eb-Pakete/
Or a live cd version from here:
http://sourceforge.net/projects/qt4-fsa ... 0language/
Which you could put onto a usb key if you wanted to.

Edit. Can I please ask, as this is a tutorial and not a discussion thread, if you have problems understanding the tutorial then by all means reply to this thread. However if you want to discuss the relative merits of this solution against any other, then please start a new thread. Thanks.
DataMan

Re: Disk Images with qt4-fsarchiver.

Post by DataMan »

+++ Writeup Viking777

Quick question on the qt4 version of fsarchiver.... does the gui version support the full switch options that are available in the baash level (RescueCD)?

For the community.... I too have been using fsarchiver (RescueCD version) for ~5 years. I do weekly backups of my production ops partition as well as several dynamic data partitions. I always take 2 images of my ops partition during the update process (1 before and 1 after the update). This gives me a recovery point in the event that the update goes awry. I have successfully restored ext3, ext4 and ntfs partitions with no ill effects.

For those of you that are interested in the bash level fsarchiver, I put a small paper together on the same subject http://www.boomerclan.info/techpaperslx ... ver-2.html.

Thanks again Viking.

-DataMan
viking777

Re: Disk Images with qt4-fsarchiver.

Post by viking777 »

I think it has most of them covered - multi core support, splitting, overwrite, encrypt, compression setting, but I have never seen an option for this:
It can also restore the data on a different file-system, so it can use it when you want to convert your file-system: you can backup an ext3 file-system, and restore it as a reiserfs.
(from here: http://www.fsarchiver.org/Main_Page )

Of course it is perfectly possible that I haven't seen it because I haven't looked for it, or maybe there is nothing to actually look for. In other words perhaps what that means is that if you restore your ext3 image to a reiser formatted partition it just works? I am not clear on that, but if that is the case then I would say it has all the command line options covered. I have never tried this function.

The advantage of the qt4 version from Mint's point of view is that it caters for those who are less comfortable with the command line, and that is really the core audience.

Good to know you have success with it as well - including ntfs, I wasn't certain about that.
DataMan

Re: Disk Images with qt4-fsarchiver.

Post by DataMan »

Of course it is perfectly possible that I haven't seen it because I haven't looked for it, or maybe there is nothing to actually look for. In other words perhaps what that means is that if you restore your ext3 image to a reiser formatted partition it just works? I am not clear on that, but if that is the case then I would say it has all the command line options covered. I have never tried this function.
The reason I ask is that I typically use the -j4z5 options (4 core, compression level 5). I've also started to split the output fielsize up to dvd sized outputs.
The advantage of the qt4 version from Mint's point of view is that it caters for those who are less comfortable with the command line, and that is really the core audience.
Fully agree. I may build it up in my production ops as an option for me.

Thanks again for your great tutorial.

-DataMan
viking777

Re: Disk Images with qt4-fsarchiver.

Post by viking777 »

In response partly to DataMan's question and partly for my own curiosity, I set up an experiment (using an old computer) to test how far I could 'push' qt4. I did the following.

Set up a 'live' image of MInt 13 (ie I imaged Mint 13 from qt4 running on Mint 13). After that I deleted a smaller partition and reformatted it as reiserfs. I then restored the Mint 13 image into the new reiser partition (it moved from sda6 to sda12). Obviously I had to update grub in order for it to recognise the new position of Mint on my disk, but when I did it booted quite happily.

So I proved three things. It is perfectly capable of doing live images, it is perfectly capable of moving distros from one partition to another (although you have to update grub separately), and it is perfectly capable of restoring into a smaller partition than the one it originated from.

What I did not prove however is its claimed ability (see previous post) to restore from one filesystem type to another, because when I checked the file system type on the new sda12 partition it is ext4 exactly the same as it was on sda6. I can't say I am surprised by this, my conclusion is that this functionality may be in the command line version but it is not in the qt4 version.

Overall though I think this is a fairly good performance for the program given the amount of hurdles I gave it to overcome.
DataMan

Re: Disk Images with qt4-fsarchiver.

Post by DataMan »

It looks like there is an additional qualifier in the restfs

Code: Select all

mkfs=reiserfs
I'm making a "leap of faith" in assuming the use of the qualifier spans all file system types.

For example original archive of a ext3 file system. The desired restore filesystem in ext4 would like like

Code: Select all

fsarchiver restfs -vj4 /media/BU/sda6-20130204.fsa id=0,dest=/dev/sda6,mkfs=ext4
This code has not been verified.

-DataMan
viking777

Re: Disk Images with qt4-fsarchiver.

Post by viking777 »

OK thanks for that. A corresponding setting is not present in the qt4 version so I guess that is the one area in which it is weaker than cli. I can't imagine filesystem switching is a thing that people want to do all that often anyway.
Dyfi

Re: Disk Images with qt4-fsarchiver.

Post by Dyfi »

Qt4fsarchiver is also contained within the Partedmagic live CD and can be run from there.
viking777

Re: Disk Images with qt4-fsarchiver.

Post by viking777 »

Good news Qt4-fsarchiver junkies. A brand new version has just been released with new functions. 0.6.15-3 now has a full hard drive cloning/imaging function (accessible from the 'Actions' menu). This enables a whole hard drive to be imaged to a file or cloned to another disk instead of just a particular partition.

You can get the .deb packet here:
http://sourceforge.net/projects/qt4-fsa ... nd%20Maya/

Or the live cd version here:

http://sourceforge.net/projects/qt4-fsa ... 0language/
viking777

Re: Disk Images with qt4-fsarchiver.

Post by viking777 »

Caution.

As I said in the post above qt4 comes with a new feature - clone/image whole drive. As this feature is new I had not tried it out however, now I have, and I cannot recommend it.

My hard drive is 500Gb in size but only has 35Gb of data on it. I set up a whole disk copy to an image file with qt4. After letting it run for 45 minutes it had completed 1% of the image and had an estimated time to completion of 15 hours :shock:

Unsurprisingly I didn't want to wait 15 hours for the image to complete so I cancelled it and tried again with Clonezilla. It completed a whole disk image in 25 minutes.

So in conclusion whilst qt4 is still (imo) the best partition imager around (because of its simplicity) the new HD imager function is best left alone unless you have a lot of free time. Clonezilla works for this (although it still suffers from a dreadful user interface - I guess it always will) another alternative for whole disk images with an easier interface might be redobackup although I have never tried this personally.
Orbmiser

Re: Partition Images with qt4-fsarchiver.

Post by Orbmiser »

"might be redobackup although I have never tried this personally."
I have and yep a lot simpler than Clonezilla with same engine under the hood.
Whole drive or selectable partitions. Whole drive 80gb was about 30mins.

Too Bad about the to slow to be useful of qt4-fsachiver hope they can do better than that?
.
DataMan

Re: Partition Images with qt4-fsarchiver.

Post by DataMan »

I've got a couple of >80G partitions on one of my 2TB drives. I'll kick off a partition level backup with qt4-fsarchiver this weekend and report back on experiences.

-DataMan
viking777

Re: Partition Images with qt4-fsarchiver.

Post by viking777 »

DataMan wrote:I've got a couple of >80G partitions on one of my 2TB drives. I'll kick off a partition level backup with qt4-fsarchiver this weekend and report back on experiences.

-DataMan
If its anything like my experience, I would start it today - it might be finished by the weekend :lol:

On a more serious note I also wonder what it does with whole disk images if you have a fat32 partition (these are obligatory on Uefi systems like mine). I have already proved that it can't backup fat32 partitions singly, so why should it be able to do so as a part of a whole disk? This could have serious implications because it would make whole disk images of Uefi systems either impossible to complete or impossible to restore in a working state, far more serious than it just taking a long time to complete.
DataMan

Re: Partition Images with qt4-fsarchiver.

Post by DataMan »

First results : Large partition backup with qt4-fsarchiver

Ok, Viking perked my interest with his predicted ~8 hr run time on backing up a +80G partition. :lol:

As of this morning's run:

Partition allocated size : 146.4 G
Used Space : 60.49G
Used 4 core and a compression setting of bzip2 fast
Files backed up (large media type of files) : 6136
Directories backed up : 389
Links : 10

Run time with qt4-fsarchiver : 50M 36S

Sometime in the next few days, I'll run a backup of the same partition with fsarchiver native (RescueCD) and report back on the times.

-DataMan
viking777

Re: Partition Images with qt4-fsarchiver.

Post by viking777 »

Interesting results - thanks DataMan that time is not unreasonable really, I wonder why mine was so slow? Could it have been the EFI System partition (fat32) that just baulks it without giving any error message? I will have another go with different compression settings, I just used the default settings last time.
viking777

Re: Partition Images with qt4-fsarchiver.

Post by viking777 »

I was right about the fat32 partitions, but wrong about the lack of warnings, it gives this:

Code: Select all

WARNING: GPT (GUID Partition Table) detected on '/dev/sda'! The util fdisk doesn't support GPT. Use GNU Parted.
And just stops. So it is absolutely useless for imaging Uefi disks.
Post Reply

Return to “Tutorials”