DevHeads.net

Cloning an EXT4 partition

I want to use partition clones as part of my backup strategy, or at least
experiment with them. I've been happy with ntfsclone for windows
partitions, and just noticed that there appear to be utilities for doing
the same with other partition type, like vfat and ext4.

Unfortunately, my first experience with partclone.ext4 (part of the
partclone package) was not good. It persists in giving me errors with
messages that don't make sense: File too big when there's plenty of space,
for starters.

Anyone have experience with this package, or any replacement?

++ kevin

Comments

Re: Cloning an EXT4 partition

By Liam Proven at 07/09/2019 - 18:02

On Tue, 9 Jul 2019 at 23:49, Kevin O'Gorman < ... at gmail dot com> wrote:
If you're backing up onto FAT disks, you need to remember the size limits.

On FAT32 a file can only be up to 2GB (less 1 sector), no more.

exFAT allows bigger but it is not enabled by default on most Linuxes
because it's MS patent protected. Cynically I think this is 1 reason
they did exFAT -- because they tried to copyright FAT32 but it was too
late, dozens of 3rd parties had implemented it.

I've used Clonezilla and G4L with some success, but as boot disks. For
online use, i.e. in a booted running system, I use Partimage. Works
well for me.

But remember you can't back up the volume that the PC booted from --
multiple files are locked open and can't be copied. (Use ``lsof'' if
you're curious what.)

Re: Cloning an EXT4 partition

By Liam Proven at 08/06/2019 - 05:34

OK, so it's not that, then.

What are you using to make the images?

Another plug for partimage:
<a href="http://www.partimage.org" title="http://www.partimage.org">http://www.partimage.org</a>

It has an option to automatically split / recombine backups across
multiple files of your chosen size. I think from memory it defaults to
2 decimal GB which fits nearly inside FAT32's 2 GiB restriction.

Re: Cloning an EXT4 partition

By Kevin O'Gorman at 08/07/2019 - 10:21

For the images, I have been using tar, dd, ntfsclone and gzip with no
problems.
The experiment that failed used partclone..

I also just noticed that ntfsclone by itself is not enough to preserve a
bootable Windows partition. You have to also copy the first 16 sectors
(see <a href="http://www.ntfs.com/ntfs-partition-boot-sector.htm" title="http://www.ntfs.com/ntfs-partition-boot-sector.htm">http://www.ntfs.com/ntfs-partition-boot-sector.htm</a>)
I'm wondering if partclone.ntfs takes care of that. I'll be experimenting.

Re: Cloning an EXT4 partition

By oxy via ubuntu-users at 08/07/2019 - 10:51

On Wed, 7 Aug 2019 07:21:46 -0700, Kevin O'Gorman wrote:
In my experiences Windows backups gain absolutely nothing.
I once tried to restore Windows 98 or XP, I don't remember which
Windows, after a HDD failed. Since the new HDD wasn't the old HDD ;),
Windows didn't accepted the restored install. I don't remember the exact
problem, but probably it's enough, if the HDD reports back another
serial number via SMART.

Re: Cloning an EXT4 partition

By Colin Law at 08/05/2019 - 17:10

Clonezilla uses partclone and has a very good name. I use it (though not
with massive partitions) without problems. It might be interesting for you
to try clonezilla to whether it succeeds. It tells you the low level
command it uses so you can use that manually from the command line or
script to repeat similar operations.

Colin