Linux Format forums Forum Index Linux Format forums
Help, discussion, magazine feedback and more
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Backing Up Linux / Transferring to another HDD

 
Post new topic   Reply to topic    Linux Format forums Forum Index -> Help!
View previous topic :: View next topic  
Author Message
jonburton



Joined: Fri Sep 07, 2012 1:19 pm
Posts: 2

PostPosted: Sun Apr 14, 2013 2:11 pm    Post subject: Backing Up Linux / Transferring to another HDD Reply with quote

Hi Everyone,

I am a brand new Linux user so sorry if this is a very basic post! Ive migrated from Windows to Linux and have now got my Ubuntu 12.04LTS just as I like it with a couple of apps installed (Virtual Box, VMWare Player)

I have decided to upgrade my HDD to an SSD but dont want to reinstall everything again! Is there a way of making a full backup of my set up to a usb keyfob or an easy way to migrate it over to the new SSD

I am running on a laptop

Thanks Smile
Back to top
View user's profile Send private message
Dutch_Master
LXF regular


Joined: Tue Mar 27, 2007 2:49 am
Posts: 2431

PostPosted: Sun Apr 14, 2013 2:59 pm    Post subject: Reply with quote

Provided the SSD is at least equal in size to your current HDD, you can copy the entire disk using the dd command. However, you need to perform this task from a Live CD (like Knoppix), not your current installation.
Back to top
View user's profile Send private message
nelz
Site admin


Joined: Mon Apr 04, 2005 12:52 pm
Posts: 8457
Location: Warrington, UK

PostPosted: Sun Apr 14, 2013 4:06 pm    Post subject: Reply with quote

Don't use dd to copy a hard drive's geometry to an SSD, it could give terrible performance. Repartition the drive with a recent version of Gparted, then copy the contents of each filesystem across separately.
_________________
"Insanity: doing the same thing over and over again and expecting different results." (Albert Einstein)
Back to top
View user's profile Send private message
jonburton



Joined: Fri Sep 07, 2012 1:19 pm
Posts: 2

PostPosted: Sun Apr 14, 2013 4:34 pm    Post subject: Reply with quote

Is there a way of me backing everything up to a usb stick / dvd using something like Ghost (from the windows days) and then swapping the HDD for the SSD and restore everything?
Back to top
View user's profile Send private message
nelz
Site admin


Joined: Mon Apr 04, 2005 12:52 pm
Posts: 8457
Location: Warrington, UK

PostPosted: Sun Apr 14, 2013 5:04 pm    Post subject: Reply with quote

I wouldn't use something like Ghost, although such programs are available, to transfer to an SSD, it needs to be correctly formatted from scratch. If you have a typical Ubuntu single partition plus swap setup, you could use tar, from a live distro, to backup to a stick, but you have to jump through a few hoops if it is FAT formatted (because of the 4GB file size limit). USB to SATA adaptors are cheap (so cheap that some SSD kits come with them) and make the process so much simpler as you can have both drives connected at the same time.
_________________
"Insanity: doing the same thing over and over again and expecting different results." (Albert Einstein)
Back to top
View user's profile Send private message
glenn4uk



Joined: Fri Nov 27, 2009 1:35 am
Posts: 5
Location: Athens, Alabama, USA

PostPosted: Wed Apr 17, 2013 7:13 pm    Post subject: Reply with quote

Jonburton,

dd will work perfectly fine to copy one drive to another. SSD makes no difference. You just have to have physical access to both drives which might be an issue on a laptop. dd will make an EXACT copy of either a whole drive or a single partiton - drive geometry is a non-issue.

You might look into Clonezilla, however. It works very much like Ghost but will work with virtually any Linux file system. It does allow you to back up a compressed copy of disk or file system for restoring after you swap drives.
Back to top
View user's profile Send private message
nelz
Site admin


Joined: Mon Apr 04, 2005 12:52 pm
Posts: 8457
Location: Warrington, UK

PostPosted: Wed Apr 17, 2013 8:35 pm    Post subject: Reply with quote

You do realise that an SSD needs to be partitioned with different block alignment? Otherwise performance, particularly on writes, suffers horrendously.
_________________
"Insanity: doing the same thing over and over again and expecting different results." (Albert Einstein)
Back to top
View user's profile Send private message
glenn4uk



Joined: Fri Nov 27, 2009 1:35 am
Posts: 5
Location: Athens, Alabama, USA

PostPosted: Thu Apr 18, 2013 12:27 am    Post subject: Reply with quote

Semantics, I guess. SSD partitions do have to be properly aligned but that is not disk geometry since SSDs do not have Cylinders or Heads. And since Jonburton has a recent install of Linux (or even Win 7 or 8) on his spinning disk, his partitions are almost certainly aligned properly. So a dd will copy those aligned partitions exactly. I still think Clonezilla would be a better approach, however, since it will allow him to image to a flash drive and then restore to his new SSD.
Back to top
View user's profile Send private message
nelz
Site admin


Joined: Mon Apr 04, 2005 12:52 pm
Posts: 8457
Location: Warrington, UK

PostPosted: Thu Apr 18, 2013 12:44 am    Post subject: Reply with quote

We don't know how old the laptop is or when the disk was partitioned, so that is not a safe assumption.

Even 4k block alignment is not sufficient for SSDs. Incidentally, hard drives don't use CHS geometry any more, it is all LBA now.
_________________
"Insanity: doing the same thing over and over again and expecting different results." (Albert Einstein)
Back to top
View user's profile Send private message
View previous topic :: View next topic  
Display posts from previous:   
Post new topic   Reply to topic    Linux Format forums Forum Index -> Help! All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Linux Format forums topic RSS feed 


Powered by phpBB © 2001, 2005 phpBB Group


Copyright 2011 Future Publishing, all rights reserved.


Web hosting by UKFast