Backup and restore onto different hard drive

0 views
Skip to first unread message

Ryan Ralph

unread,
Nov 25, 2009, 8:06:44 AM11/25/09
to ubun...@lists.ubuntu.com
Hi everyone,

Was just wondering if someone could explain to me how the best way to go about backing up my setup at the moment.

What I need to do is do is take a "ghost image" (windows term) of my 120gb hard drive that ubuntu is currently installed on and then restore it onto one of my newer 500gb drives.

I was thinking that I could try using dd, copy the backup to one of the 500gb drives, then restore it to the other 500gb drive and resize the partition if required. This seems like it would be quite time consuming.

Does anyone know a better way? If not could someone please explain what commands I would need to use for dd?

Thanks in advance

--
Ryan Ralph
ryanra...@gmail.com

Matthew Hannigan

unread,
Nov 25, 2009, 10:11:31 PM11/25/09
to Ryan Ralph, ubun...@lists.ubuntu.com
I'd use the -a option to cp rather than dd.
dd preservies/copies far more than you want or need, and requires
you to resize afterwards.

So..


cd source && cp -a . destination


Are you ok with the grub stuff?

> --
> ubuntu-au mailing list
> ubun...@lists.ubuntu.com
> https://lists.ubuntu.com/mailman/listinfo/ubuntu-au


--
ubuntu-au mailing list
ubun...@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-au

Ryan Ralph

unread,
Nov 25, 2009, 10:33:04 PM11/25/09
to ubuntu-au
I think I can manage to work out the grub stuff.

Is it possible to guarantee all data will be copied exactly or is that what the -a option does?
--
Ryan Ralph
ryanra...@gmail.com

Sridhar Dhanapalan

unread,
Nov 26, 2009, 2:14:11 AM11/26/09
to Ryan Ralph, ubun...@lists.ubuntu.com
2009/11/26 Ryan Ralph <ryanra...@gmail.com>:

dd is a traditional method, but in recent years some better tools have
come out for this purpose. I'd recommend clonezilla.


--
Bring choice back to your computer.
http://www.linux.org.au/linux

Sridhar Dhanapalan

unread,
Nov 26, 2009, 2:16:56 AM11/26/09
to Ryan Ralph, ubuntu-au
-a does an 'archive' copy, meaning that it tries to preserve as much
as it can (permissions, etc.).

If you choose this option, don't use it to copy a live system.

I still think that something like clonezilla is a better alternative.
You preserve the entire filesystem and all its metadata, and you can
trivially resize afterwards it to match the target disc with gparted.


2009/11/26 Ryan Ralph <ryanra...@gmail.com>:

--
Bring choice back to your computer.
http://www.linux.org.au/linux

--

Paul Gear

unread,
Nov 27, 2009, 4:37:47 PM11/27/09
to Ubuntu AU List
Matthew Hannigan wrote:
> I'd use the -a option to cp rather than dd.
> dd preservies/copies far more than you want or need, and requires
> you to resize afterwards.
>
> So..
>
>
> cd source && cp -a . destination

I have to say i agree with the other guys - cp is not the best option
for filesystem backup/restore/migration. A block-level copy like dd,
clonezilla, etc. is a much better option.

The best option of all, in my opinion, is to use a volume manager like
LVM. When i move my laptop to a larger hard disk, i'll just put the new
hard disk in a caddy, move the volume group using LVM's pvmove, then
reboot with the new hard disk inside.

Paul

paul.vcf
Reply all
Reply to author
Forward
0 new messages