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
Please visit our sponsors
Results 1 to 2 of 2
Threaded View
-
31-10-2024, 11:08 AM #1
Can I Import a google cloud instance to another VPS using DD backup & restore ?
-
Sponsored Links
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
24 Hour Gold
Advertising
- Over 20.000 UNIQUE Daily!
- Get Maximum Exposure For Your Site!
- Get QUALITY Converting Traffic!
- Advertise Here Today!
Out Of Billions Of Website's Online.
Members Are Online From.
- Get Maximum Exposure For Your Site!
- Get QUALITY Converting Traffic!
- Advertise Here Today!
Out Of Billions Of Website's Online.
Members Are Online From.