clone an installation with DD

Today I managed to clone a mounted linux installation with DD. This was the code:

 dd if=/dev/sdb3  of=/dev/sdb2 

/dev/sdb2 was mounted, but I let it inactive. In this way I got a perfecft and working clone of my first operative system. Of course I had to

  • fix a problem in the new partition (with GParted: check and fix partition): I noticed that fstab was not recognized as text file, i.g..
  • change /etc/fstab according to the UUID of the new installation (UUID of /dev/sdb2 is different from UUID of /dev/sdb3, as I saw in GParted)

Maybe I was very lucky. I’m not saying that you should follow my example: the best thing is to work on unmounted partitions.