Foxclone - linux image backup, restore & clone

Questions about applications and software
Forum rules
Before you post please read how to get help
User avatar
AndyMH
Level 11
Level 11
Posts: 3999
Joined: Fri Mar 04, 2016 5:23 pm
Location: Wiltshire

Re: Foxclone - linux image backup, restore & clone

Post by AndyMH »

The problem you had is repeatable - there is a problem restoring from a split file backup. It's a long time since I tested split file backup/restore :( . As you have found, no problem backing up to an ext4 partition (or ntfs) and restoring - default is not to split files. I'll now find out why and fix on the split files.
could you add a verification tool
not sure I could do this, what did you have in mind?

EDIT - found the problem, an example restore command for split files is:

Code: Select all

cat "/media/andy/FAT32PART/20200514test.sda1.img.gz.*" | unpigz -c | pkexec partclone.ntfs -r -F -s - -O /dev/sda1
cat doesn't like the quotes around the filename. I'd put the quotes in to cater for spaces in filenames, I'll have to escape the spaces. Of course I put the quotes in after I'd last tested split files :oops:
Homebrew i5-8400+GTX1080 Cinnamon 19.0, 3 x Thinkpad T430 Cinnamon 19.0, i7-3632 , i5-3320, i5-3210, Thinkpad T60 19.0 Mate

User avatar
AndyMH
Level 11
Level 11
Posts: 3999
Joined: Fri Mar 04, 2016 5:23 pm
Location: Wiltshire

Re: Foxclone - linux image backup, restore & clone

Post by AndyMH »

V39 is now on the website, fixes the bug with trying to restore from a 'split files' backup.

Note that while a fat32 partition can have a maximum size of 2TB and the max file size is 4GB, it is crippled in windows to a max partition size of 32GB, MS "encouraging" users to switch to NTFS!
Homebrew i5-8400+GTX1080 Cinnamon 19.0, 3 x Thinkpad T430 Cinnamon 19.0, i7-3632 , i5-3320, i5-3210, Thinkpad T60 19.0 Mate

User avatar
AndyMH
Level 11
Level 11
Posts: 3999
Joined: Fri Mar 04, 2016 5:23 pm
Location: Wiltshire

Re: Foxclone - linux image backup, restore & clone

Post by AndyMH »

bob466 wrote:
Thu May 14, 2020 6:47 am
So I Re-Formatted it to NTFS and did it allover again and it worked just fine.
If you did this in gparted, you might just want to check permissions on the partition, you might find it owned by root, not that foxclone cares (runs as root), but if you want to put other stuff on it.
Homebrew i5-8400+GTX1080 Cinnamon 19.0, 3 x Thinkpad T430 Cinnamon 19.0, i7-3632 , i5-3320, i5-3210, Thinkpad T60 19.0 Mate

User avatar
frostymusic
Level 4
Level 4
Posts: 245
Joined: Fri Jul 06, 2018 8:21 pm

Re: Foxclone - linux image backup, restore & clone

Post by frostymusic »

Finely got a chance to back up and restore with FoxClone, everything came back as it should have.

Great software,

User avatar
AndyMH
Level 11
Level 11
Posts: 3999
Joined: Fri Mar 04, 2016 5:23 pm
Location: Wiltshire

Re: Foxclone - linux image backup, restore & clone

Post by AndyMH »

Thanks, plaudits always welcome (as are problems) :D
Homebrew i5-8400+GTX1080 Cinnamon 19.0, 3 x Thinkpad T430 Cinnamon 19.0, i7-3632 , i5-3320, i5-3210, Thinkpad T60 19.0 Mate

User avatar
bob466
Level 5
Level 5
Posts: 855
Joined: Mon May 15, 2017 5:23 am
Location: Australia

Re: Foxclone - linux image backup, restore & clone

Post by bob466 »

Hi Andy,
To answer your questions...
I haven't split any files...FoxClone creates the Image as shown...https://ibb.co/LzmcvfZ The Split File box in not ticked.

I don't use Gparted for anything...especially Formatting and I don't create Partitions either. When I install any Distro...I always choose...Erase Disk and install Linux...This creates one Partition on the Drive...I use a 500GB Drive and have been doing this for years and don't get any problems. Image

As for the Verify Image option...if FoxClone creates a good Image every time like Macrium does...there's no need for one.

I've been testing FoxClone for a few days and here are my results. FoxClone works very well on Linux Lite and Linux Mint Cinnamon 19.1...creating an Image and Restoring it without any trouble and the instructions are easy to follow.

My main Drive is a 500GB SSD...running Cinnamon 19.1...how will FoxClone go and how will it compare with Macrium...this is what I found.

Main Drive is a 500GB SSD...Space in use 188.4GB. FoxClone to create an Image took 28 minutes 4 seconds with compression at default (2)...Image 120.5GB. Image

On the same Drive Macrium took 2 hrs 15 mins and the compressed Image was 127.3GB...of cause Macrium takes about 30 mins to verity the Image. Image

FoxClone took 22 mins 22 secs to Restore the Image...I didn't restore the Macrium Image. When I removed the Flash Drive and Booted into the FoxClone Re-Imaged Drive...everything worked perfectly and everything was exactly how it was before the Image was created...great Software and just what we need for Linux. Image

I didn't try the Clone feature because I stopped Cloning Drives years ago as an Image is so much better...IMO. Image
Linux For Ever...Windoze Never Image

Lady Fitzgerald
Level 4
Level 4
Posts: 474
Joined: Tue Jan 07, 2020 3:12 pm
Location: AZ, SSA (Squabbling States of America)

Re: Foxclone - linux image backup, restore & clone

Post by Lady Fitzgerald »

bob466 wrote:
Sat May 16, 2020 9:03 pm
...As for the Verify Image option...if FoxClone creates a good Image every time like Macrium does...there's no need for one....
In the years I used Macrium Reflect on Win 7, I occasionally would have an image that wouldn't verify (granted, it was rare). Every time it happened, though, I just started over and the new image would verify. I didn't mind the extra time to verify an image; it took only a few seconds to start the image (verification was set to be automatic), then just let the computer do all the work while I did something else (eat, sleep, make a pit stop, watch TV, etc.) or even continued to use the computer.

I used cloning strictly to migrate from one drive to another one. It was faster than imaging and restoring. I never used cloning for backing up the System; that's what imaging was for.
Last edited by Lady Fitzgerald on Sun May 17, 2020 1:53 pm, edited 1 time in total.
Jeannie

Linux Mint Cinnamon 19.3 Cinnamon 64 bit
System 76 Serval WS (serw11) 17" Laptop

pbear
Level 14
Level 14
Posts: 5206
Joined: Wed Jun 21, 2017 12:25 pm
Location: San Francisco

Re: Foxclone - linux image backup, restore & clone

Post by pbear »

bob466 wrote:
Sat May 16, 2020 9:03 pm
As for the Verify Image option...if FoxClone creates a good Image every time like Macrium does...there's no need for one.
Russian roulette is perfectly safe if there's not a bullet in the chamber. :mrgreen:

The reason backup apps include a verification step is that 99.99% reliable isn't the same thing as 100% reliable. You can skip verification if you like, but don't kid yourself. You're taking a small but nonzero risk. For what? To shave a little unattended time from the backup? Not worth it to me. YMMV.

rene
Level 16
Level 16
Posts: 6244
Joined: Sun Mar 27, 2016 6:58 pm

Re: Foxclone - linux image backup, restore & clone

Post by rene »

pbear wrote:
Sun May 17, 2020 10:55 am
Russian roulette is perfectly safe if there's not a bullet in the chamber. :mrgreen:
Also, things such as image verification do not defend against anything the creating application could've done anything about but against e.g. spurious hardware issues in much (or even exactly) the same way as say ECC RAM. You nor I on many of my machines using ECC RAM says something about chances but the original statement
bob466 wrote:
Sat May 16, 2020 9:03 pm
As for the Verify Image option...if FoxClone creates a good Image every time like Macrium does...there's no need for one.
is still really besides the point...

User avatar
bob466
Level 5
Level 5
Posts: 855
Joined: Mon May 15, 2017 5:23 am
Location: Australia

Re: Foxclone - linux image backup, restore & clone

Post by bob466 »

pbear wrote:
Sun May 17, 2020 10:55 am
bob466 wrote:
Sat May 16, 2020 9:03 pm
As for the Verify Image option...if FoxClone creates a good Image every time like Macrium does...there's no need for one.
Russian roulette is perfectly safe if there's not a bullet in the chamber. :mrgreen:

The reason backup apps include a verification step is that 99.99% reliable isn't the same thing as 100% reliable. You can skip verification if you like, but don't kid yourself. You're taking a small but nonzero risk. For what? To shave a little unattended time from the backup? Not worth it to me. YMMV.
Macrium is the only Imaging Software that does Verify the Image and works with Linux as I said to Andy if Fox Clone had this option it would be perfect but that's out of my control...you're one of those Clonezilla supporters are you...have you tried FoxClone ?

I have tried FoxClone and it's excellent...leaves Clonezilla for dead but any software would. :lol: I've been caught in the past using Imaging Software that creates a bad Image...I don't need to be reminded. Image
Linux For Ever...Windoze Never Image

User avatar
Larry78723
Level 7
Level 7
Posts: 1815
Joined: Wed Jan 09, 2019 7:01 pm
Location: Jasper County, SC, USA

Re: Foxclone - linux image backup, restore & clone

Post by Larry78723 »

For those of you that were having a problem with the foxclone.com website yesterday, it is back up and running.
Image

pbear
Level 14
Level 14
Posts: 5206
Joined: Wed Jun 21, 2017 12:25 pm
Location: San Francisco

Re: Foxclone - linux image backup, restore & clone

Post by pbear »

bob466 wrote:
Sun May 17, 2020 8:49 pm
...you're one of those Clonezilla supporters are you...
Used to use, and don't think it's all that difficult, but decided image backup was a poor investment of time and energy. Instead, I rely on a combination of file backup options which, even with redundancy, are easier to administer and more current.

Anyhoo, not interested in debating backup strategy. Merely pointed out that your argument against verification isn't sound. Of course, any user (including you) is free to decline verification, but should understand they're taking a small but nonzero risk.

Dumfy
Level 2
Level 2
Posts: 59
Joined: Thu Oct 15, 2015 8:35 am

Re: Foxclone - linux image backup, restore & clone

Post by Dumfy »

Hello everyone,

Just a quick question . .
I was wondering if Foxclone will work with btrfs partitions or only with FAT32, NTFS and ext4 partitions?

Many thanks

Dumfy

User avatar
AndyMH
Level 11
Level 11
Posts: 3999
Joined: Fri Mar 04, 2016 5:23 pm
Location: Wiltshire

Re: Foxclone - linux image backup, restore & clone

Post by AndyMH »

I've not tested with with btrfs, but partclone (which foxclone uses) does support btrfs, so it may work. Try and post back.
Homebrew i5-8400+GTX1080 Cinnamon 19.0, 3 x Thinkpad T430 Cinnamon 19.0, i7-3632 , i5-3320, i5-3210, Thinkpad T60 19.0 Mate

User avatar
Drugwash
Level 4
Level 4
Posts: 265
Joined: Fri Jun 07, 2019 6:40 am
Location: Ploieşti, RO

Re: Foxclone - linux image backup, restore & clone

Post by Drugwash »

Just found out about this application. Sounds great, if only it does what I need. I did read all comments but still unclear about my particular situation, so thought best thing was to ask directly.

Got a 500GB HDD in this notebook and it's failing; it was an emergency install before buying a working HDD. There are a few partitions, including some free space which I don't know what application created and why. Of all that, all I care about is the boot partition sda1 (selected in the screenshot below). That partition I want to clone to the new HDD, which is 1TB in size, so that it becomes its system partition. The rest of the free space will be handled manually at a later time.
Screenshot from 2020-05-22 17-10-02.png
Now, etc/fstab reads as follows:

Code: Select all

UUID=5a3f5ab8-9c26-42af-b963-14807afb06dd /               ext4    errors=remount-ro 0       1
/swapfile                                 none            swap    sw              0       0
UUID=BC644D1E644CDCB0 /media/dragos/Data auto nosuid,nodev,nofail,x-gvfs-show 0 0
UUID=138f61f2-2e38-466e-bd04-a1ec5f9d6381 /media/dragos/OldMint192 auto nosuid,nodev,nofail,x-gvfs-show 0 0
UUID=0B11C79C795B6475 /media/dragos/Omnia3-2TB auto nosuid,nodev,nofail,x-gvfs-show 0 0
The last entry is an external HDD connected through USB so that one should keep its UUID, but the previous two (Data and OldMint192) are the other partitions on the current HDD. What would happen when the cloned system on the new HDD won't find those two partitions? Or even the first one assigned to root (which may be critical)?
Dunno how these UUIDs get calculated and assigned; would there be any way to check for their presence or calculate new ones automatically (at least for root)? Or allow the user to manually edit/delete entries (in some advanced/expert mode)?
I know I recently had a bogus entry in fstab due to a bad application, and that rendered the system unbootable, so I'd rather be safe than sorry (considering I don't have any other working machine around to get help from the board or web in case things go wrong).

Also, GRUB is customized through Grub Customizer and has entries for the second Mint installation that it found on sda2, installation that I actually copied file by file from a previous broken HDD and is not needed on the new HDD. Would there be problems with GRUB in the cloned system? If yes, how to fix it?

Last question for the peace of mind: is it OK to save the image to an external USB HDD (actually connected through an USB2SATA adapter) formatted as NTFS, and then restore to the new internal HDD from that external HDD? Or does cloning require both source and destination drives to be connected simultaneously?

User avatar
AndyMH
Level 11
Level 11
Posts: 3999
Joined: Fri Mar 04, 2016 5:23 pm
Location: Wiltshire

Re: Foxclone - linux image backup, restore & clone

Post by AndyMH »

Download the iso, burn it to a usb stick using mint's 'usb image writer' and boot from it.

Do a backup immediately while that drive is still hanging on.

You can either do a full backup to another drive (and then 'clone from file' at some later point to your new hard drive) or you can clone the existing drive to another drive. Yes it will work with an external drive connected via a sata/usb adapter - a lot of my testing was done that way.

A backup creates compressed image files on the destination, destination can be either ext4 or ntfs (or fat32 if you insist or pretty much any other filesystem supported by linux).

A clone makes the destination an exact copy of the source - it doesn't matter how the destination was formatted, it all gets overwritten. Whatever partitions you had on the source get replicated on the destination, this includes the partition table, grub and the UUIDs of all the partitions.

Foxclone (and clonezilla) are image backup, they don't care (or know anything about) files, they just take 'pictures' of your partitions.

Your screenshot shows three other 2TB drives. I would do a full backup of sda (your 500GB failing HDD) to one of these drives (so if you screw up later you have a copy). Or you can use an external usb drive. Note - backup not clone. You will need free space on one of the partitions on one of these 2TB drives at least equal to the total used space on the 500GB drive (foxclone will tell you if there isn't enough space).

Plug in your new 1TB drive via your sata/usb adapter and use the 'clone from file' to create a clone of the backup you just created. Then use gparted (there is a copy on the foxclone iso) to delete the partitions you don't want and resize/move the partitions you are keeping to use the extra space on the 1TB drive (or create new partitions).

Swap out the failing 500GB drive and replace with the new 1TB drive and reboot, it should all work.

Read the user guide!
Homebrew i5-8400+GTX1080 Cinnamon 19.0, 3 x Thinkpad T430 Cinnamon 19.0, i7-3632 , i5-3320, i5-3210, Thinkpad T60 19.0 Mate

User avatar
Drugwash
Level 4
Level 4
Posts: 265
Joined: Fri Jun 07, 2019 6:40 am
Location: Ploieşti, RO

Re: Foxclone - linux image backup, restore & clone

Post by Drugwash »

Thanks for replying. From what you said I gather this tool cannot create a clone - or image or whatever it may be called - of only one partition of choice, namely the boot+system. I specifically said I do not want anything else from the source drive.

The three 2TB drives are all external, connected through USB2SATA adapters and only one of them has some free space, but I do not want to waste it with a clone of 500GB (full almost to the brim) when all I need is 53GB. Actually I already created an image of the boot partition yesterday using the default Disks utility. Could I use that? Maybe by launching a live Mint and restoring to the new 1TB HDD after swapping the failing 500GB one? I can't connect the new one externally for a handful of reasons (sockets won't match - I use large 3.5" HDDs, adapters can't accomodate 2.5" HDDs; no spare adapters anyway; no spare USB sockets on the notebook).

So I guess I'll keep looking for something to match my requirements. But good luck with your tool, I'm sure it will be useful to many people.

User avatar
AndyMH
Level 11
Level 11
Posts: 3999
Joined: Fri Mar 04, 2016 5:23 pm
Location: Wiltshire

Re: Foxclone - linux image backup, restore & clone

Post by AndyMH »

Drugwash wrote:
Fri May 22, 2020 1:23 pm
only one partition of choice

Actually I already created an image of the boot partition yesterday using the default Disks utility. Could I use that?
No, and the reason why is the partition table. An image of a partition without something to say where it lives (the partition table) is useless. If you clone an individual partition without the partition table how is the system going to find it? The partition table tells the system where each partition starts and ends on the drive and what type of filesystem it is.

That is why I said do a full backup or a clone and then get rid of what you don't want with gparted - that way the partition table is kept up to date. You won't find any imaging software that does what you want.
Homebrew i5-8400+GTX1080 Cinnamon 19.0, 3 x Thinkpad T430 Cinnamon 19.0, i7-3632 , i5-3320, i5-3210, Thinkpad T60 19.0 Mate

User avatar
Drugwash
Level 4
Level 4
Posts: 265
Joined: Fri Jun 07, 2019 6:40 am
Location: Ploieşti, RO

Re: Foxclone - linux image backup, restore & clone

Post by Drugwash »

AndyMH wrote:
Fri May 22, 2020 2:09 pm
An image of a partition without something to say where it lives (the partition table) is useless.
Can't see a reason why an application couldn't copy the source partition table and extract only the relevant information, then fit that information automatically, or allow the user to manually specify the location on the target and then automatically adjust everything as needed (I'm thinking of MBR-style only, dunno about GPT and all that). Maybe some commercial application does that already, but I'm not familiar with any and got no money to spend anyway.

Well, let's leave it at that. Thanks again.

User avatar
Drugwash
Level 4
Level 4
Posts: 265
Joined: Fri Jun 07, 2019 6:40 am
Location: Ploieşti, RO

Re: Foxclone - linux image backup, restore & clone

Post by Drugwash »

Just a follow up to say that I managed to restore to the new HDD the partition created earlier with Disks.
I made some errors at first attempt, then got the right idea and went on to success.
For restoration I used Disks, GPartEd and Boot Repair from the Mint live disc.

First I tried to restore the image directly to the unformatted HDD, thinking Disks would be intelligent enough to automatically calculate partition size from the image and create a partition table that would fit that partition exactly, leaving the rest of the space unallocated. I was wrong. Disks made the whole 1TB drive a single partition and - surprisingly to me - marked both used space, free space and unallocated space inside that partition. I never knew such combination could exist! :shock:
Anyway, all attempts to shrink that unique partition in order to make room for other primary partitions on the drive have failed. So I went on to a different approach.

- Blanked out the unique 1TB partition to return the drive to previous unformatted state.
- Created first partition at the beginning of the disk, making sure it had at least the same size as the image (53GB); I chose 80GB. File system EXT4 same as the image. Set the 'boot' flag to make it bootable.
- Created two other partitions in the unallocated space.
- Restored the image to that first partition (using Disks).
- Used GPartEd to Check the first partition in order to enlarge it to its new, greater size.

At this point partition was restored, all files were intact. However, the restored etc/fstab was pointing to the old partitions that had different UUIDs.
So I launched Nemo, opened the etc folder as root, opened fstab in Text Editor and replaced the UUIDs and names of the old partitions with the new UUIDs and names. Careful with file systems if different than previously, because they each have different arguments!
Dunno if all that was necessary - it might've been easier to just comment out the pertaining lines and let the system readd them after boot. But since I needed to check the root UUID - which due to some unknown previous operation was correct - I thought I should fiddle with those too, see if it works. And then I rebooted.

But it wouldn't boot. Remembered Boot Repair and launched it. Looked through the options and selected GRUB reinstall and the destination partition (sda1 for me). There are other options there, such as Unhide boot menu, and others - use as desired. There is also an option to edit the grub configuration file if needed.
- Applied the selected options in Boot Repair and rebooted to HDD. Success!

The only thing that would have to be adjusted later, if needed, is the boot menu which got hidden because I disabled Unhide boot menu, but since it does start directly with the desired option it doesn't bother me much.

So, all in all I think it is possible to restore a single partition from image - even a boot one, as proven above - but it may not be a simple, straightforward operation and would require manual intervention. Still, in desperate situations a single tool that could perform the necessary steps in at least a semi-automatic way would be very helpful. Maybe you could integrate such functionality in Foxclone. 8)

BTW, creating an image of the new 80GB partition took almost an hour in Disks - imagine how long it would've taken the whole 500GB...

Post Reply

Return to “Software & Applications”