Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > HOWTO-Related Questions

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 21st April 2009, 19:16
jkrell jkrell is offline
Member
 
Join Date: Oct 2006
Posts: 61
Thanks: 6
Thanked 1 Time in 1 Post
Default Emergency -- Need to Restore File from Clonezilla image

So back in February I made a backup image of my Fedora 10 server machine using the howto on this site. The setup of my server is that I have 3 250Gb HDDs setup as one disk using LVM. The backup process went smoothly and I have my backup stored on an external 1Tb HDD.

Last week, I accidentally erased a file using command line. I was just absent-mindedly doing stuff and what is weird is I don't remember being asked to confirm deletion. In any event, the file is gone and I need it back. I have checked everywhere and the only place it exists is in the Clonezilla live image (normally I have redundancies, but I did not want this file in my other backup spots, which are not as secure as the external HDD I use for my Clonezilla images.

Needless to say, I do not just want to restore the image because now months have gone by and other files have changed, which I do not want to lose by restoring the image. One thing I could do is just backup my /home and /var/www/ folders and then restore the image, and then restore the /home and /var/www/ folders. But this would be risky as I am not sure what else might have changed in the interim.

I have done some research and found the following regarding how to mount a Clonezilla image and pull files from it:

http://ubuntuforums.org/showthread.php?t=872832

Unfortunately, this does not work for me, mostly because I cannot figure out how to reference my image. Like I said above, I made an image of the entire disk, which is set up using LVM, so I do not have a file ending in -img in the subfolder for my backup. I cannot post my directory structure of the backup now because I am at work, but I can do so later and I can also post the output of my attempts at mounting the image.

For now, though, I wanted to ask a question. Is there a way I can simply restore the Clonezilla image to my 1Tb external HDD? Once restored, I could pull the file I need out, and wipe the drive clean. The problem is, as I mentioned above, that my image is of an LVM setup, whereas my external HDD is a single 1Tb drive.

Do you think I could use GParted to create 3 drives the same sizes as my three existing 250Gb drives, and restore the image to those? Would that work?
Reply With Quote
Sponsored Links
  #2  
Old 21st April 2009, 21:15
tebokkel tebokkel is offline
Member
 
Join Date: Feb 2007
Location: The Netherlands
Posts: 96
Thanks: 0
Thanked 9 Times in 9 Posts
Default

If you have enough space to restore a unzipped image (let's say, about the size of all space you used up in February), I'ld much rather go that way.
It's a lot easier than nearly erasing your system to restore an image. If you can restore the image, I would think you can also mount it as an image.

So, what do you mean with "referencing" your images? Is it not on the same machine?

Any output/screendump or script that you can post?

Paul
Reply With Quote
  #3  
Old 21st April 2009, 22:34
jkrell jkrell is offline
Member
 
Join Date: Oct 2006
Posts: 61
Thanks: 6
Thanked 1 Time in 1 Post
Default

I am not sure I understand what you are talking about.

First, if you click on the link I posted, it tells you to type in 'cat [name of image] | gzip -d -c | ntfsclone ... etc., etc.

Where it says [name of image] is what I mean by "referencing" my image. Everything is on the same computer (which I thought was pretty clear from my OP).

You say that if I have space to restore an image you'd much rather go that way. What way? As opposed to what other way? This is where I get confused by your message.

Also, I never said I was going to erase my system. That is the whole point.

Finally, as noted in my OP, I am at work and cannot access the machine. I'll post more about the backup file folder structure and output when I try mounting when I can mess around with the computer at home.

For now, I am really looking for people's thoughts on the very simple question at the end of my OP.
Reply With Quote
  #4  
Old 21st April 2009, 23:02
tebokkel tebokkel is offline
Member
 
Join Date: Feb 2007
Location: The Netherlands
Posts: 96
Thanks: 0
Thanked 9 Times in 9 Posts
Default

I wasn't trying to get you pissed..

The answer to your question: no, that's not possible. You have only one image, so creating three partitions is probably not neccesary.

What I meant, is that it's preferable to restore the image in another location and move the file you need to it's original location. Waaaaay more convinient than backing up /var/www, /home, restoring your whole system and then restoring /var/www and /home. That's simply not needed.

Awell.. you got my thoughts on your simple question..

Paul
Reply With Quote
  #5  
Old 21st April 2009, 23:24
jkrell jkrell is offline
Member
 
Join Date: Oct 2006
Posts: 61
Thanks: 6
Thanked 1 Time in 1 Post
Default

Thanks. I am not pissed, just confused.

Please note that the image that is backed up is LVM and includes three separate drives. Therefore, SDA1, SDB1, and SDC1 are all part of my logical volume that I backed up.

When I try to restore the image to a blank 500Gb partition on my external hard drive, it says something like it cannot do it because there are multiple devices in the image. That is why I thought I should maybe set up three separate partitions (SDE1, SDE2 and SDE3) for the backup.

That will not work?
Reply With Quote
  #6  
Old 23rd April 2009, 17:24
jkrell jkrell is offline
Member
 
Join Date: Oct 2006
Posts: 61
Thanks: 6
Thanked 1 Time in 1 Post
Default Additional Information

So I promised additional information. Here is the contents of my Clonezilla backup directory:

Code:
[----@----------- 2009-02-22-21-img]$ ls
disk                 sda-mbr        sdc-pt.sf
Info-dmi.txt         sda-pt.parted  sdd1.dd-img
Info-lshw.txt        sda-pt.sf      sdd1-size
Info-packages.txt    sdb-chs.sf     sdd-chs.sf
lvm_logv.list        sdb-mbr        sdd-mbr
lvm_vg_dev.list      sdb-pt.parted  sdd-pt.parted
lvm_VolGroup00.conf  sdb-pt.sf      sdd-pt.sf
parts                sdc-chs.sf     swappt-VolGroup00-LogVol01.info
sda1                 sdc-mbr        VolGroup00-LogVol00
sda-chs.sf           sdc-pt.parted
I believe the backup file is 'VolGroup00-LogVol00' but it is confusing because it does not end with 'img' -- but maybe that means nothing.

If I type 'file VolGroup*', here is what I get:

Code:
VolGroup00-LogVol00: gzip compressed data, from Unix, last modified: Sun Feb 22 14:58:30 2009, max speed
So then, per the Clonezilla FAQ (referenced at the Ubuntu forum I linked to in my OP), I enter 'cat VolGroup* | gzip -d -c | ntfsclone --restore-image -o /home/partimag/sde2/test.img -', I get:

Code:
ntfsclone v2.0.0 (libntfs 10:0:0)
ERROR: Input file is not an image! (invalid magic)
But it has to be the image because that is the largest file in the directory. Anyone have any ideas?
Reply With Quote
  #7  
Old 24th April 2009, 14:18
tebokkel tebokkel is offline
Member
 
Join Date: Feb 2007
Location: The Netherlands
Posts: 96
Thanks: 0
Thanked 9 Times in 9 Posts
 
Default

This is a difficult one.. The basic volumes of an LVM-group are not very useful for recovery of a single file. Basically you should be able to restore the images as you proposed, and then restore the file. But it probably takes a lot of tinkering.

Good luck!

Paul
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Postfix delivery problem erebus Installation/Configuration 8 29th July 2014 20:17
Chroot SSH + ISPConfig Norman Installation/Configuration 27 26th March 2007 03:40
Systemimager (rsync) doesn't copy all comedit HOWTO-Related Questions 11 19th January 2007 17:17
jamed up my table borders?? Boon-Dog-Danny Installation/Configuration 5 23rd September 2006 16:12
64-bit Debian 3.1 Install Issue naruto Installation/Configuration 14 5th September 2006 04:12


All times are GMT +2. The time now is 16:00.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.