So I have this google cloud instance running Centos 7 with a bunch of stuff installed and I am trying to avoid going through the painful process of reinstalling everything again .

For the last 3 days I have been looking for a way to clone my instance into another VPS and am yet to find something that works .

My first approach was to use dd to clone the main partition but even after being able to restore it to another HDD and setting it as boot partition everything broke and never managed to boot from it .

Here are the partitions I have in my google cloud instance :

Code:
[root@instance-7 ~]# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 10G 0 disk
└─sda1 8:1 0 10G 0 part /
sdb 8:16 0 14G 0 disk
└─sdb2 8:18 0 14G 0 part /mnt/sdb2
sdb is just a disk I have created to clone the main partition image, so what I need to restore is /dev/sda
Made a raw image using dd like this :

Code:
dd if=/dev/sda | gzip -c > /mnt/sdb2/backup.img.gz
sda filesystem is xts as I can see per df -Th command :
Code:
Filesystem Type Size Used Avail Use% Mounted on
devtmpfs devtmpfs 1.8G 0 1.8G 0% /dev
tmpfs tmpfs 1.8G 0 1.8G 0% /dev/shm
tmpfs tmpfs 1.8G 193M 1.6G 11% /run
tmpfs tmpfs 1.8G 0 1.8G 0% /sys/fs/cgroup
/dev/sda1 xfs 10G 8.0G 2.1G 80% /
tmpfs tmpfs 354M 0 354M 0% /run/user/0
tmpfs tmpfs 354M 0 354M 0% /run/user/1000
/dev/sdb2 ext4 14G 5.6G 7.4G 44% /mnt/sdb2
Tried restoring the image multiple times without success with command :

Code:
gunzip -c /path/to/your-backup.img.gz | dd of=/dev/sdX
I also converted the destination partition filesystem to xfs .

So far unable to boot from both vps's where I tried to clone it .

Any hints to what else I can do to debug this properly ?

Thanks