Recovering a single partition from all-disk-backup

General support questions
Post Reply
.-fc-.
Posts: 10
Joined: 2014/11/26 13:43:46

Recovering a single partition from all-disk-backup

Post by .-fc-. » 2015/03/22 17:09:08

Hi!

I backed up a full HDD with dd and split in this way:

Code: Select all

dd if=/dev/sdc | gzip -2 | split -d -b 3500M -  image-compress.img.gz.
Now I want to recover from this backup, but only a single partition!

Is this possible?

Thanks in advance!

Whoever
Posts: 1361
Joined: 2013/09/06 03:12:10

Re: Recovering a single partition from all-disk-backup

Post by Whoever » 2015/03/22 17:20:24

You have to gunzip it to a single file, then use losetup and kpartx to make the partitions accessible.

.-fc-.
Posts: 10
Joined: 2014/11/26 13:43:46

Re: Recovering a single partition from all-disk-backup

Post by .-fc-. » 2015/03/22 17:32:04

Thanks for the answer!
Is there no way around gunzip'ing it? There is a reason I originally split it: The only drive with enough free space is a NTFS-drive :(

Can I recover it with kpartx as well?

User avatar
TrevorH
Site Admin
Posts: 33219
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Recovering a single partition from all-disk-backup

Post by TrevorH » 2015/03/22 18:40:10

NTFS is quite happy with files > 4GB, it's fat* that cannot handle it.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

.-fc-.
Posts: 10
Joined: 2014/11/26 13:43:46

Re: Recovering a single partition from all-disk-backup

Post by .-fc-. » 2015/03/22 23:55:26

Sorry my fault. Meant FAT of course.

Additionally the image is 400GB. When I unzip it, it will be over 500GB (size of the hdd). I don't have anyHDD with that much free space. Will any filesystem (except fat) be able to handle 500GB-files? Is there no other way?

.-fc-.
Posts: 10
Joined: 2014/11/26 13:43:46

Re: Recovering a single partition from all-disk-backup

Post by .-fc-. » 2015/03/23 16:35:05

Okay, I organized a HDD with enough free space.
Just to be sure: I have many of these files: image-compress.img.gz.xx where xx ranges from 00 to 99
(ups, did the backup run out of numbers at that point??? The last file only has 3.9 instead of 4.1GB, so let's hope it was a lucky coincidence...
Will I be able to restore anything if it just wasn't?
Damn, how to prevent that? Would

Code: Select all

dd if=/dev/sdc | gzip -2 | split -a 4 -d -b 3500M -  image-compress.img.gz.
do a better job?)

Can I now gunzip this with

Code: Select all

gunzip image-compress.img.gz.* extracted_backup.dd
? Or this:

Code: Select all

cd path & cat image-compress.img.gz. | gunzip -d -c > extracted_backup.img

.-fc-.
Posts: 10
Joined: 2014/11/26 13:43:46

Re: Recovering a single partition from all-disk-backup

Post by .-fc-. » 2015/03/23 23:50:43

Okay. This worked:

Code: Select all

cd path & cat image-compress.img.gz. | gunzip -d -c > image.img
Now I don't really know how to continue. I will try and research it tomorrow.

Post Reply