MAMEWorld >> The Loony Bin
Previous thread Previous  View all threads Index   Next thread Next   Threaded Mode Threaded  

Pages: 1

mike20599
MAME Fan
Reged: 09/14/08
Posts: 247
Send PM


Best way to clone and restore hard drive?
#339482 - 05/01/15 11:15 PM


I've got an old laptop that I have just installed Windows 8 and everything else I need on it. Basically I want to clone the drive so I can restore it to just as it is now in the event someone else installs a bunch of junk that I want to get rid of. Is there a good free software for doing that? System Restore doesn't quite do that, does it?

Also, is it possible to make a second partition on the hard drive and put the restore image on there? So I don't have to restore from USB or DVD or something.



lharms
MAME Fan
Reged: 01/07/06
Posts: 909
Send PM


Re: Best way to clone and restore hard drive? new [Re: mike20599]
#339483 - 05/02/15 01:16 AM


You will need a second drive big enough to hold the old drive.

You probably could move stuff around and get a second partition on there but it would be pain to do.

Something like this
https://forums.virtualbox.org/viewtopic.php?t=22422

or a bootable linux cd and the command dd or cp could do it.
https://wiki.archlinux.org/index.php/Disk_cloning

Another way to do it is using the built in backup for window7 and 8.
http://windows.microsoft.com/en-us/windows/back-up-files

In windows 7 it will create a vdi file which is a clone of the drive.



Vas Crabb
BOFH
Reged: 12/13/05
Posts: 4471
Loc: Melbourne, Australia
Send PM


Re: Best way to clone and restore hard drive? new [Re: lharms]
#339484 - 05/02/15 02:08 AM


> You probably could move stuff around and get a second partition on there but it would
> be pain to do.

Yeah, moving stuff and shrinking partitions is somewhat risky. The MS tools can do it under certain circumstances. You can also boot Linux and use gparted to shrink NTFS partitions, but it's definitely "at your own risk" (although it's worked perfectly for me the last few times I've tried it).

> Another way to do it is using the built in backup for window7 and 8.
> http://windows.microsoft.com/en-us/windows/back-up-files
>
> In windows 7 it will create a vdi file which is a clone of the drive.

This. It's free and it works.



mike20599
MAME Fan
Reged: 09/14/08
Posts: 247
Send PM


Re: Best way to clone and restore hard drive? new [Re: lharms]
#339487 - 05/02/15 02:32 AM


Thanks I'll check those out. Do they clone the actual whole drive? Really all I want is to clone a partition, and just the data on that partition. Like if the partition is 100 GB, but only has 20 GB of data, I only want the 20 GB to be backed up.



Vas Crabb
BOFH
Reged: 12/13/05
Posts: 4471
Loc: Melbourne, Australia
Send PM


Re: Best way to clone and restore hard drive? new [Re: mike20599]
#339489 - 05/02/15 04:10 AM


> Thanks I'll check those out. Do they clone the actual whole drive? Really all I want
> is to clone a partition, and just the data on that partition. Like if the partition
> is 100 GB, but only has 20 GB of data, I only want the 20 GB to be backed up.

The image created by the Microsoft backup tools is only as big as the data on the disk, it does't include free space.



Pi
Allergic to life
Reged: 09/20/03
Posts: 6449
Loc: Room 101
Send PM


Re: Best way to clone and restore hard drive? new [Re: mike20599]
#339497 - 05/02/15 12:40 PM


> I've got an old laptop that I have just installed Windows 8 and everything else I
> need on it. Basically I want to clone the drive so I can restore it to just as it is
> now in the event someone else installs a bunch of junk that I want to get rid of. Is
> there a good free software for doing that? System Restore doesn't quite do that, does
> it?
>
> Also, is it possible to make a second partition on the hard drive and put the restore
> image on there? So I don't have to restore from USB or DVD or something.

Virtual images are good for virtualization, but IMHO you need a dedicated backup utility.

To move data around to create that second partition, Partition Wizard has a free edition which *I think* can do that (sorry if I'm wrong):
http://www.partitionwizard.com/free-partition-manager.html

And for the backup, I use the free edition of Macrium Reflect, which to this day a) does all I need to do and b) hasn't failed me even if the scariest circumstances:
http://www.macrium.com/reflectfree.aspx

Just be sure that "intelligent sector copy" is enabled, and choose high compression. While it takes somewhat longer (the high compression), the result is sensibly smaller.

Also be sure that before each backup, you clean temp folders, browser caches and alikes, you'll save even more space and time.

However, if you can plug-in a big enough pendrive or usb drive to do a first backup before moving data around to create that second partition, it'd be better.



Wound up, can't sleep, can't do anything right, little honey / Oh, since I set my eyes on you. / I tell you the truth.
I can't get it right / Get it right / Since I met you...



PokeMAME
Gotta catch 'em all!
Reged: 09/20/03
Posts: 1405
Loc: San Antonio, TX
Send PM


Clonezilla... new [Re: mike20599]
#339498 - 05/02/15 03:03 PM


http://clonezilla.org/


Quote:


What is Clonezilla?
Clonezilla is a partition and disk imaging/cloning program similar to True Image® or Norton Ghost®. It helps you to do system deployment, bare metal backup and recovery. Two types of Clonezilla are available, Clonezilla live and Clonezilla SE (server edition). Clonezilla live is suitable for single machine backup and restore. While Clonezilla SE is for massive deployment, it can clone many (40 plus!) computers simultaneously. Clonezilla saves and restores only used blocks in the harddisk. This increases the clone efficiency. With some high-end hardware in a 42-node cluster, a multicast restoring at rate 8 GB/min was reported.









lharms
MAME Fan
Reged: 01/07/06
Posts: 909
Send PM


Re: Best way to clone and restore hard drive? new [Re: Vas Crabb]
#339501 - 05/02/15 04:36 PM


CloneVDI and the MS backup tool will only create a file the size of the data on your drive that is not zeroed out. So you will want to use a util like sdelete first. If you had a big file on there but deleted it at some point the data is still there but the metadata to find it is gone. But from the POV of the clone tool there is data there.

https://technet.microsoft.com/en-us/sysinternals/bb897443.aspx

I use it all the time to help maintain my virtual machines.

I think one of the requirements of the MS backup tool is a separate drive.

The linux commands I mentioned will copy *everything* (including empty data). You can make it copy just the partition or the whole drive.

I have done the linux command cat a few times to compress the drive too. Something like 'cat /dev/hdb > gzip -9 back.zip'

PokeMAME mentioned clonezilla. Though it looks like you have to take the computer offline to image it. I have also in the past used driveimage xml but it was rather slooow.

If all you are looking for is 'someone nuked my drive I need to put it back' and it is windows. Just stick with windows backup. Built in and free and you can keep using the computer while it is backing up. I have mine set to backup once a week. The restore stuff built into the installer recognizes it and will restore the drive. Unfortunatly it is local drives only for home edition. So I had to resort to some trickery to make it work across a network. The other downside is it will only clone the 'c' drive and nothing else. Or at least I have not found a way to make it do my other drives. It will backup the files but not clone them.



Pi
Allergic to life
Reged: 09/20/03
Posts: 6449
Loc: Room 101
Send PM


Re: Clonezilla... new [Re: PokeMAME]
#339505 - 05/02/15 05:06 PM


> http://clonezilla.org/

Clonezilla is great but has some limitations that Mike might find "bad". For example you need to reboot and boot from Clonezilla's disc/pendrive to make anything, even if it's just backing up, while Windows Backup or Reflect can do it online while the volume(s) are in use.

I don't know if Windows Backup can restore a drive from a backup directly, in case of disaster. Reflect can do it just by creating its rescue disc (something I forgot to mention). It contains the appropiate Windows PE and needed drivers it polls from the running system when creating the rescue disc.

I'm not really a fan of propietary programs and formats, but Reflect has never failed me and saved me quite a few times.



Wound up, can't sleep, can't do anything right, little honey / Oh, since I set my eyes on you. / I tell you the truth.
I can't get it right / Get it right / Since I met you...



redk9258
Regular
Reged: 09/21/03
Posts: 3968
Loc: Troy, Illinois USA
Send PM


Re: Best way to clone and restore hard drive? new [Re: lharms]
#339506 - 05/02/15 06:02 PM


> https://technet.microsoft.com/en-us/sysinternals/bb897443.aspx

I think you meant https://technet.microsoft.com/en-us/sysinternals/ee656415



Vas Crabb
BOFH
Reged: 12/13/05
Posts: 4471
Loc: Melbourne, Australia
Send PM


Re: Best way to clone and restore hard drive? new [Re: lharms]
#339519 - 05/02/15 11:51 PM


> CloneVDI and the MS backup tool will only create a file the size of the data on your
> drive that is not zeroed out. So you will want to use a util like sdelete first. If
> you had a big file on there but deleted it at some point the data is still there but
> the metadata to find it is gone. But from the POV of the clone tool there is data
> there.

That's not even true: the MS Backup tool will not copy unused blocks whether they're zeroed or not as it's NTFS-aware. Disk2vhd isn't the same thing as the MS Backup utility.

> I think one of the requirements of the MS backup tool is a separate drive.

No, you can back up to any partition that you aren't making part of the backup.

> I have done the linux command cat a few times to compress the drive too. Something
> like 'cat /dev/hdb > gzip -9 back.zip'

The standard filename extension for gzip files is '.gz' and that command won't work at all. I think you meant something like 'gzip -c9 - < /dev/hdb > back.gz' but whatever you do, make sure you remount the partition read-only before trying that. Also you really shouldn't be telling people to do things you clearly don't understand yourself



Vas Crabb
BOFH
Reged: 12/13/05
Posts: 4471
Loc: Melbourne, Australia
Send PM


Re: Clonezilla... new [Re: Pi]
#339520 - 05/02/15 11:53 PM


> I don't know if Windows Backup can restore a drive from a backup directly, in case of
> disaster. Reflect can do it just by creating its rescue disc (something I forgot to
> mention). It contains the appropiate Windows PE and needed drivers it polls from the
> running system when creating the rescue disc.

Windows Backup lets you create a bootable CD/DVD/USB disk with appropriate drivers.



lharms
MAME Fan
Reged: 01/07/06
Posts: 909
Send PM


Re: Best way to clone and restore hard drive? new [Re: Vas Crabb]
#339523 - 05/03/15 02:05 AM


> > CloneVDI and the MS backup tool will only create a file the size of the data on
> your
> > drive that is not zeroed out. So you will want to use a util like sdelete first. If
> > you had a big file on there but deleted it at some point the data is still there
> but
> > the metadata to find it is gone. But from the POV of the clone tool there is data
> > there.
>
> That's not even true: the MS Backup tool will not copy unused blocks whether they're
> zeroed or not as it's NTFS-aware. Disk2vhd isn't the same thing as the MS Backup
> utility.

Hmm not my experience but maybe they fixed something recently.

>
> > I think one of the requirements of the MS backup tool is a separate drive.
>
> No, you can back up to any partition that you aren't making part of the backup.

Yeah that is what I said. You can not set the backup drive to the same one you are backing up. You can also only clone 1 drive. The rest can only be file backup. Unless I am missing some setting. Remember Home!=Ultimate when it comes to the backup util.

>
> > I have done the linux command cat a few times to compress the drive too. Something
> > like 'cat /dev/hdb > gzip -9 back.zip'
>
> The standard filename extension for gzip files is '.gz' and that command won't work
> at all. I think you meant something like 'gzip -c9 - < /dev/hdb > back.gz' but
> whatever you do, make sure you remount the partition read-only before trying that.
> Also you really shouldn't be telling people to do things you clearly don't understand
> yourself

Wow no shit... Perhaps I know what I am doing and you are just being a pedantic jerkoff? You *CLEARLY* did not read my 'something like'. But instead want to make assumptions. I am not going to tell him how to do something. He is going to *HAVE* to learn to do it himself and by readings the man pages. I am merely giving pointers and being *NICE* about it (but if you want me to be a pissy jackoff I can totally oblige). FORGIVE my computer faux pas of mistyping zip vs gz and missing one of the command parameters for something I use once every couple of years. Maybe I accidentally mistook this board for stackoverflow like you did?



Vas Crabb
BOFH
Reged: 12/13/05
Posts: 4471
Loc: Melbourne, Australia
Send PM


Re: Best way to clone and restore hard drive? new [Re: lharms]
#339556 - 05/03/15 03:10 PM


> > That's not even true: the MS Backup tool will not copy unused blocks whether they're
> > zeroed or not as it's NTFS-aware. Disk2vhd isn't the same thing as the MS Backup
> > utility.
>
> Hmm not my experience but maybe they fixed something recently.

This was with the Backup utility on stock Windows 7 Pro - are you sure you're talking about the Backup utility and not the Disk2vhd utility that redk referred to? Disk2vhd may show the behaviour you describe.

> > > I think one of the requirements of the MS backup tool is a separate drive.
> >
> > No, you can back up to any partition that you aren't making part of the backup.
>
> Yeah that is what I said. You can not set the backup drive to the same one you are
> backing up. You can also only clone 1 drive. The rest can only be file backup. Unless
> I am missing some setting. Remember Home!=Ultimate when it comes to the backup util.

When you say "drive" do you mean another partition, or another disk? You can't create an image of a partition on the same partition, that would make no sense at all. But you can make an image of a partition on another partition on the same disk. Windows 7 Pro allows you to image whichever partitions you want, not only the boot volume.

> > > I have done the linux command cat a few times to compress the drive too.
> Something
> > > like 'cat /dev/hdb > gzip -9 back.zip'
> >
> > The standard filename extension for gzip files is '.gz' and that command won't work
> > at all. I think you meant something like 'gzip -c9 - < /dev/hdb > back.gz' but
> > whatever you do, make sure you remount the partition read-only before trying that.
> > Also you really shouldn't be telling people to do things you clearly don't
> understand
> > yourself
>
> Wow no shit... Perhaps I know what I am doing and you are just being a pedantic
> jerkoff? You *CLEARLY* did not read my 'something like'. But instead want to make
> assumptions. I am not going to tell him how to do something. He is going to *HAVE* to
> learn to do it himself and by readings the man pages. I am merely giving pointers and
> being *NICE* about it (but if you want me to be a pissy jackoff I can totally
> oblige). FORGIVE my computer faux pas of mistyping zip vs gz and missing one of the
> command parameters for something I use once every couple of years. Maybe I
> accidentally mistook this board for stackoverflow like you did?

OK, let's go through everything wrong with that command you gave:

  • cat abuse - using cat in places where it isn't needed wastes resources and can lead to unexpected results
  • Using stdout redirect > when you mean pipe | which isn't obscure man page stuff, but basic shell usage common to Windows and *NIX
  • Expecting gzip to process stdin when it's well-known that it operates on files in-place, once again not obscure man page stuff but basic use of the tool (that's you you need to give '-' as an argument if you want it to compress stdin to stdout)
  • Forgetting that gzip won't compress to stdout without -c
  • Using .zip instead of .gz for a gzip file - that's not mistyping, mistyping would be something like .fz or .gx, that's a completely different combination of letters
  • Recommending to do something on a disk/partition device without appropriate warnings about precautions and risks, e.g. always remounting read-only before trying this stuff
  • Recommending use of a tool that does character I/O on a character device - you should really use a block I/O tool like dd to read a disk/partition device


If anyone's making assumptions it's you: you're assuming someone can look at a command that's completely wrong/dangerous/inefficient and somehow work out a sensible course of action from that. The fact is, people do try things they see recommended on the Internet. There's already enough bad advice out there without you contributing to it.

I'm not being pedantic, I'm just rather shocked at your cavalier attitude to advice on things where data integrity is important (backup) and wrong moves are liable to hose your data (working with disk/partition devices).



redk9258
Regular
Reged: 09/21/03
Posts: 3968
Loc: Troy, Illinois USA
Send PM


Re: Best way to clone and restore hard drive? new [Re: Vas Crabb]
#339564 - 05/03/15 04:47 PM


Using VSS Snapshot (Volume Shadow Copy) you actually CAN create an image on the SAME partition that you are backing up. The image will not be in the backup. This would be useful if you did not have access to another partition or drive at the moment. You could transfer the image to another drive via USB , network, etc later. Of course, if you make another backup with the first image still there, it will be much larger.



StilettoAdministrator
They're always after me Lucky ROMS!
Reged: 03/07/04
Posts: 6472
Send PM


Re: Best way to clone and restore hard drive? new [Re: redk9258]
#339570 - 05/03/15 06:01 PM


> > https://technet.microsoft.com/en-us/sysinternals/bb897443.aspx
>
> I think you meant https://technet.microsoft.com/en-us/sysinternals/ee656415

He actually did mean Sdelete, reread his post...

Not saying he's right...

- Stiletto



redk9258
Regular
Reged: 09/21/03
Posts: 3968
Loc: Troy, Illinois USA
Send PM


Re: Best way to clone and restore hard drive? new [Re: Stiletto]
#339589 - 05/04/15 01:44 AM


Damn, you're right. I was thinking too much about cloning a drive!


Pages: 1

MAMEWorld >> The Loony Bin
Previous thread Previous  View all threads Index   Next thread Next   Threaded Mode Threaded  

Extra information Permissions
Moderator:  GatKong 
0 registered and 122 anonymous users are browsing this forum.
You cannot start new topics
You cannot reply to topics
HTML is enabled
UBBCode is enabled
Thread views: 2305