LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 01-14-2020, 02:02 PM   #1
tripton
LQ Newbie
 
Registered: Jan 2020
Posts: 1

Rep: Reputation: Disabled
Can I Import a google cloud instance to another VPS using DD backup & restore ?


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
 
Old 01-16-2020, 06:36 AM   #2
dc.901
Senior Member
 
Registered: Aug 2018
Location: Atlanta, GA - USA
Distribution: CentOS/RHEL, openSuSE/SLES, Ubuntu
Posts: 1,005

Rep: Reputation: 370Reputation: 370Reputation: 370Reputation: 370
Quote:
Originally Posted by tripton View Post
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 .
So, you spent 3-days at this, and you think it would have taken you more than 3-days to spin up new instance and install everything?

Quote:
Originally Posted by tripton View Post
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 .
What is the exact error?

Where are you trying to restore? Have you looked at their docs?
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Cloud 5: Dispelling cloud myths, the cloud security excuse, and the fight for cloud supremacy LXer Syndicated Linux News 0 06-20-2014 04:12 PM
LXer: Cloud 5: NSA not killing cloud, cloud IT jobs, rise of cloud brokers LXer Syndicated Linux News 0 03-02-2014 09:51 AM
LXer: Cloud 5: Netflix's cloud-connected brain, 5 cloud myths and from cloud to fog LXer Syndicated Linux News 0 02-21-2014 02:20 PM
LXer: It's a cloud, cloud, cloud, cloud world LXer Syndicated Linux News 0 07-23-2013 05:40 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 02:10 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration