I am running on Debian (testing) with cinnamon graphical environment. Each time I change my computer, I am lazy to do all the basic stuff (reinstall all the software, configuration files ...) so I would like to create a clone of my machine. However, how this procedure can be clean ?

  • I mean if it's a copy of all bytes of the system partition /, I should use the same machine (for the drivers ...) so that I don't need to remove paquets or install new ones on the new machine ?

What is the best way to perform this procedure ? I read about clonezilla, dd but I am not convinced by how they perform the clone.


Honestly Linux lets you get away with a lot, moving between PCs with the same architecture. Always entertains me how well it works moving a system disk between machines.

I wouldn't quite call that clean though. One example you might end up with is NetworkManager configurations for old network cards.

I have the same feeling right now. I think it's a signal to put a bit more work into getting organized :).

My thinking is one should write a record of config files (or directories) you've changed. It's useful to keep track of your reasons. Then you can copy over what you need. After installing the packages that use them. So maybe worth holding a copy of your old /etc, rather than trying to install all packages and configs in one go.

If the logs start to build up, you can start writing a prioritized summary of what you need on a system. Lower priorities are old experiments you no longer use very often, and packages that will be easy to identify and re-install when you actually want them.

It can be good to install etckeeper first, using it to record the config files as initially installed by the packages.

  • +1 for mentioning etckeeper – Rui F Ribeiro Aug 24 '16 at 12:35

How much stuff do you need to be moved over? If you don't have many personal files, but mostly installed programs and configurations, you could look into LinuxRespin which is a fork of remastersys. It lets you build a custom distributable iso which can be installed on computers and will contain programs and configurations that you had on the original system. There is a size limit, which is why this will only really be helpful if you don't have a ton of files.


Boot from a Linux live media , mount your external Hard drive then backup your drive using the command dd:

dd if=/dev/sdx | gzip > /path_to/backup.gz

To restore the backup run:

gzip -dc /path_to/backup.gz | dd of=/dev/sdx

Also you can clone the entire hd :

dd if=/dev/sdx of=/dev/sdy bs=64K conv=noerror,sync
  • The backup should be on the same type machine ? The 'dd' command is a copy byte to byte ? so for instance, drivers/librairies needed for the older machine are useless for the new one ... hence it's not that proper. I will soon try the method describe by @sourcejedi, apparently just save the configuration files are great help. I should look for also backup the list of paquets that are installed. Now I study if clonezilla/etckeeper... can do this stuff in a proper way. – Smilia Aug 29 '16 at 10:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.