0

There is a fault in the dedicated graphics card, and so my laptop is almost unusable. I am thinking of getting it fixed in the warranty. However the only problem is that Dell's complete care warranty means almost surely formatting the whole system before fixing the hardware issue. And that's undesirable because I have installed many softwares in KUbuntu 14.04 and customized it to a great extent.

So my question is, how do I take a complete backup of the Linux setup? I have /root and /home on different partitions, and there's a separate partition for swap. There are also 3 other partitions, one of them for windows (I don't care much about it though, I hardly ever use it), and other for storing general purpose files.

By complete backup I mean I store it on an external hard disk drive, and restore the Linux setup to its current state after the graphics card problem is fixed by Dell under warranty.

Tl;dr: how do I take complete backup of KUbuntu 14.04 including all softwares and customization and restore it later?

Edit: after the hardware fix, Dell will give my laptop in a factory condition, with only one partition of 500 GB, which has only windows in it. I'll manually restore the data in the remaining partitions, I'm just clueless about backing up and restoring Linux.

  • You can either make a tar of the contents of each partition, or copy (and ideally compress) the entire partition resulting in a drive image – zhongfu Apr 17 '15 at 08:11
  • Does making a tar really work? How do I restore them? I mean how will I restore the boot entries? – taninamdar Apr 17 '15 at 08:12
  • And is extracting the tar of root into an ext4 partition same as restoring Linux back to the original condition? – taninamdar Apr 17 '15 at 08:13

1 Answers1

0

Well the best way to do this is to make a 1:1 backup of the whole drive and save it.

You could use simply dd, but to be honest there is a much better way to achieve this.

Simply use clonezilla, there is a live CD available you can use to copy one harddrive to another and even a restore option.

Looking into this tool is definetly worth it.

All you need is a second hard drive.

You can get more information on clonezilla here

Using DD

If your partitions are small you can use dd to safe them and dd to restore them. But as in real life, size matters. While the new partition being bigger ain't a problem (you can correct this with tools), the partition being smaller then the original one will result in a broken partition.

So if you'd like to go that route, make sure that the partitions you create on your new machine are at least the wsame size. I'd recommend a little bit more (because some crappy tools use factor 1000 as a base to calculate the space, whereas the correct value would be 1024).

You can find a documentation for using dd on the ubuntu community help page

s1mmel
  • 2,024
  • I have looked at Clonezilla, and it seems a bit of an overkill to me. The linux partitions (root and home) constitute only about 40-45 GB, and it's the data I'm most concerned about. Backing up 500 GB will take huge time, and it's almost certain before its completion that my laptop will crash because of the graphics card problem. – taninamdar Apr 17 '15 at 08:18
  • Another question which I couldn't find the answer of is -- do I need to have the entire external hard drive empty for Clonezilla to clone the internal hdd? Because I do have a 1 TB hard drive, but it's partially filled. – taninamdar Apr 17 '15 at 08:20
  • yes as I said, it's a 1:1 copy and copys binarywise 0's and 1's, but doesn't interpret them. – s1mmel Apr 17 '15 at 10:09