PCLinuxOS-Forums
News: ...FLASH!!! ...New PCLinuxOS Testing board now open. Register today! Be an active contributor to the PCLinuxOS future! ... Read all about it now, on THIS forum!!!..
 
*
Welcome, Guest. Please login or register. May 26, 2012, 02:33:01 AM


Login with username, password and session length


Pages: 1 [2]   Go Down
  Print  
Author Topic: How much HD space?  (Read 2002 times)
katuzo
Guest
« Reply #15 on: January 29, 2010, 02:16:27 PM »

Before I get started, there is one thing I have to do, that is back up my entire drive. I just purchased another 500Gb drive that is identical to the one I'm running. I put it in a fixture so I can plug it into my Thinkpad X61 (via usb2). As I said before, I current run PCLinux off my LiveUSB. Is there a program, for Linux, that will allow me to make a bit for bit image, of my current HD to the new HD?
FYI, I did use Snalypse? to put Gparted on my LiveUSB, so I can boot from there, and run it.
Thanks Richie
Logged
pags
Hero Member
*****
Offline Offline

Posts: 1951


Keep it clean.


« Reply #16 on: January 29, 2010, 02:42:15 PM »

Before I get started, there is one thing I have to do, that is back up my entire drive. I just purchased another 500Gb drive that is identical to the one I'm running. I put it in a fixture so I can plug it into my Thinkpad X61 (via usb2). As I said before, I current run PCLinux off my LiveUSB. Is there a program, for Linux, that will allow me to make a bit for bit image, of my current HD to the new HD?
FYI, I did use Snalypse? to put Gparted on my LiveUSB, so I can boot from there, and run it.
Thanks Richie


partimage can create backups of your partitions, and save space, but you should get a copy of the MBR to go with it (if your want the possibility of bare-metal restore.  However, that is not an actual bit for bit copy.

Code:
dd
can make a bit for bit copy (but a 500 Gb drive image will take 500 Gb to store, and it will take a while to run  Shocked )

You can compress the image with
Code:
gz

If you want to split the resulting file into chunks (so it could be stored on a FAT32 device, such as a USB key, for instance) you can use
Code:
split

So, to create an image of your drive:
Code:
dd if=/dev/sda | gzip -c | split -b 2000m - /path/to/image/file
This will create chunks ~2Gb each, with consecutive extensions (aa, ab, ac, etc)

And, to restore the image (if need be):
Code:
cat /path/to/image/file* | gzip -dc | dd of=/dev/sda

dd can be potentially destructive if you get the input and output mixed up (it could overwrite an entire harddrive happily  Shocked ), so be careful!

If you want the image file to be even smaller, and you don't care about restoring the deleted files that are still on disc, you could ''zero out" the empty space, which will allow the compression to be more effective.  Post a reply if that is of any interest.

Logged
katuzo
Guest
« Reply #17 on: January 29, 2010, 03:15:14 PM »

I wish to be able to literally replace my current hard drive with the one I have made a backup on. I'll look into PartImage capable since I already have that on the SystemRescueCD that I made. I don't mind spending the time, it's easy to back up now, then to try to recover later.
Richie
Logged
pags
Hero Member
*****
Offline Offline

Posts: 1951


Keep it clean.


« Reply #18 on: January 29, 2010, 04:01:10 PM »

I wish to be able to literally replace my current hard drive with the one I have made a backup on. I'll look into PartImage capable since I already have that on the SystemRescueCD that I made. I don't mind spending the time, it's easy to back up now, then to try to recover later.
Richie

As in, you want to be able to unplug your current drive, plug in the new one and boot up?

If that is the case, then:
Code:
dd if=/dev/sda of=/dev/<device ID of new drive>
will produce an identical copy with which you could do this.

You should be able to get the device ID of the new drive by running
Quote
fdisk -l  <-- that's a lower case "el", not the number "one"
after you plugged in the new drive.
Logged
Pages: 1 [2]   Go Up
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines

Valid XHTML 1.0! Valid CSS! Dilber MC Theme by HarzeM