How to rescue my data files before reconfiguring the 2 HD's of my desktop PC?!

Fred Roller fred at fwrgallery.com
Fri Apr 9 20:38:55 UTC 2010


On 04/09/2010 06:01 AM, Bas Roufs wrote:
> Dear Everybody
>
> Attempts to repair the grub of the Kubuntu 9.10 partition at the
> desktop via a "grub rescue cd" finally failed yesterday - in spite of
> the major efforts of Goh Lip to carefully and skilfully assist me.
> Thank you, Goh Lip, anyway!
>
> Now, I am trying to rescue all the data files before totally revising
> the configuration at the 2 hard disks of the desktop PC. I am
> wondering how exactly to safely and effectively rescue my data files.
> I did already back-up most of them at an external HD

How big is the external drive?

> - except some
> important recent files - amongst them the one generated by
> KAdressbook. Additionally, about one percent of my files have not been
> correctly saved as backup at the external HD. Only recently I
> discovered a safe method to correctly copy/ backup each single file:
> compressing them to a few archives at the external HD, then unzipping/
> uncompressing them there. That's why, I am trying to backup all the
> data files again,  I hope to get some useful advises via this forum.
>    

Using what method so we don't advise the same


> One hard disk, sda, has a capacity of 80GB, the 2nd one, sdb, 160GB.
> The sda disk contains 2 partitions: sda1 with Windows XP and sda5, a
> data partition.. The sdb disk contains 3 partitions: sdb1 with Kubuntu
> 7.10, sdb6 with only data files/ backup and sdb7 with Kubuntu 9.10
>
> So far, I have tried three approaches to do so:
> * the live CD of Kubuntu 9.10
> * "Puppy Linux" - both from a live CD and and a bootable USB stick;
> * the most recent regular version of "Knoppix", from a live CD.
>    


What did you try with each respective distro.
> So far, I have been able to mount and navigate through each of the
> partitions, except the most important one: sdb7, the partition with
> Kubuntu 9.10., as well as various recent files I absolutely need to
> recover.
>    

Was/Is there an error.  Will the sdb7 not mount?  Why did this partition 
fail (if you know)?


> However it may be, I really would highly appreciate your advise with
> respect to four questions.
>
> Which exact method(s) would you advise me to mount, file manage each
> of the partitions and COMPRESS (ZIP) from there the data files to my
> external HD? (I prefer to compress/ zip folders with data files
> because it is an efficient and safe method to copy the files without
> complications.)
>    

Check below under "Where it me:"

> Which live CD and/or live USB stick would you recommend me to use for
> this emergency project: Kubuntu 9.10, Knoppix 6, Puppy Linux or any
> other recent distro? (The desktop computer can boot both from CD and
> USB. By means of my laptop and some small external device, I can
> produce live CD's without problems.)
>
> Which kind of boot medium suits best as platform for the OS enabling
> me to carry out the data rescue operation: a live CD or a live USB
> stick?
>    

Your choice, if you have the ability to boot from USB (reliably) it will 
prove much faster.

> Provided that I do manage somehow to mount and file manage sdb7, where
> and how exactly can I find the file generated by KAdressbook?
>    

I use Gnome so I will leave this one to another expert; but, you might try

     ls -a ./

from your home directory.  Programs like Thunderbird, etc. may create a 
file/directory for the user hidden from veiw.  (example Thunderbird has 
a directory ".thunderbird" in the home directory, note the period 
indicating a hidden file/directory.)  /Sometimes/ you can copy this 
directory back into place after your rebuild and the program is non-the 
wiser.


> Thanks in advance for your advise.
>
> Respectfully yours,
>
> Bas Roufs, Utrecht, The Netherlands.
>
>    
Where it me:

     Assumptions: Your external drive is >250Gb and usb.
                             You are comfortable with the command line
                             The windows partition is ntfs and all the 
linux partitions are ext3
                             We are starting from scratch and therefore 
the external drive is empty.
                             You know how to partition drives.
                             sda = sda above
                             sdb = sdb above
                             sdc = external drive

Boot to any live CD, in this case the Ubuntu Live. (Older is fine and 
preferred since they are tested and true.)

Open a terminal and go to full screen. (shouldn't need GUI and will 
therefore speed things up)

First thing to try is simply the dd command:

Ensure your external drive is formatted with one partition:  (Yes, this 
will remove what you have.)

     mkfs.ext2 /dev/sdc1

and mount the external drive

     mkdir /media/backup_drive
     mount /dev/sdc1 /media/backup_drive


start retrieving data for each of the partitions (DO NOT mount the 
partitions, umount them if they are):

     dd if=/dev/sda1 of=/media/backup_drive/old_sda1.iso bs=4026 
conv=notrunc

do this for each of the partitions remembering to change the respective 
filenames

     dd if=/dev/[partition] of=/media/backup_drive/[filename].iso 
bs=4026 conv=notrunc

should the above run into trouble then replace "dd" with "ddrescue" 
which is designed for failing drives and works around errors a bit more, 
you may lose data it can't read but it won't fail typically.

This should create a series of .iso files which from the desktop gui 
interface of lucid and a couple of previous distros will see as an 
archive allowing you to pull file one at a time.  Or you can mount the 
files and pull them out.  Either way you throw nothing away and will 
have all your data.  Hope this is helpful.  Good luck.

-- 
Fred
www.fwrgallery.com

"Life is like linux, simple.  If you are fighting it you are doing something wrong."





More information about the ubuntu-users mailing list