1

I have to ship my laptop in for repairs, and they warn that my HD might come back empty. What's the easiest way for me to back up my entire HD (which is encrypted, I might add) to a USB stick or some other external drive, and then how do I later restore everything?

I don't necessarily need a bootable exact clone. I just don't want to reinstall all the packages and modify system-level config files again.

Other answers on this site may not apply, since we're talking about a fully encrypted HD.

ffxsam
  • 335
  • Your question is too broad as there are several methods of backup. See https://askubuntu.com/questions/9135/how-to-backup-settings-and-list-of-installed-packages , I have my method there but there are other options as well. – Panther Oct 06 '17 at 15:29
  • 1
  • The fact that my whole HD is encrypted probably makes things a bit more complicated, I imagine. – ffxsam Oct 06 '17 at 15:33
  • I'm also not looking for a complicated multi-stage backup (e.g. dump a list of packages, copy apt list files, etc). I was hoping for a more "one and done" solution. – ffxsam Oct 06 '17 at 15:34
  • No, you can boot your system and back up with TAR using the method I showed you. You would then do a fresh encrypted install and restore. Personally, I would make an unencrypted backup one less point of failure. You can always encrypt the .tar – Panther Oct 06 '17 at 15:34
  • 1
    The easiest "one and done" is to simply back up your data and /home and a list of installed packages. Well that is 2 and done=) – Panther Oct 06 '17 at 15:35
  • 1
    clonezilla or dd will do, but the backup is huge – Panther Oct 06 '17 at 15:37
  • Clonezilla is simple and safe, but the backup can get huge. 'You have to pay for the simplicity in this case'. – sudodus Oct 06 '17 at 15:41
  • Yes, and restoring the clined miage can get complicated if you have a complex partitioning scheme , the new hard drive is a different size, and / or you did not copy your MBR / GPT - https://askubuntu.com/questions/57908/how-can-i-quickly-copy-a-gpt-partition-scheme-from-one-hard-drive-to-another – Panther Oct 06 '17 at 15:47
  • New versions of Clonezilla do all that for you, *if* the target drive size is at least the same as that of the source drive. – sudodus Oct 06 '17 at 15:50

1 Answers1

1

It might be easiest to create a compressed image with Clonezilla, an image of the whole drive (not of partitions). A Clonezilla image is a directory with a number of files, and you can restore from the image to a cloned system in a drive of at least the same size as the original drive.

See also this link: Fastest way to copy HDD, which describes cloning.

The simplest kind of backup is to backup only your personal files (documents, pictures, music, video clips ...). To do it the 'simple way' and include tweaks and installed programs is no longer simple ;-)

A good alternative, that might be efficient in terms of 'time and sweat' for you, is to backup only your personal files, do a fresh installation, and install the program packages, that you need, when you need them. This way you will also get rid of packages, that you no longer use.

sudodus
  • 46,324
  • 5
  • 88
  • 152