Clone a VDS; request for feature
-
- A semi-regular
- Posts: 18
- https://www.youtube.com/channel/UC40BgXanDqOYoVCYFDSTfHA
- Joined: Mon Mar 15, 2010 7:54 pm
Clone a VDS; request for feature
Hi,
I have a linux VDS server that has been set up with a fairly complicated (to me) server system and I have been unable to just copy the files and restart the services on another computer. I would like to request that a feature be added to NFO services so that a clone of the server could be created (i.e. a second duplicate NFO server). This way I can investigate the server in more detail without breaking the working version.
I understand through the help panel that this is not currently available.
My hope is that it would not be too difficult to add this feature as it would seem to me to be very much like a server move process without the deletion of the current server.
Thanks--if this feature is feasible, please let me know.
From an NFO user since 2009.
I have a linux VDS server that has been set up with a fairly complicated (to me) server system and I have been unable to just copy the files and restart the services on another computer. I would like to request that a feature be added to NFO services so that a clone of the server could be created (i.e. a second duplicate NFO server). This way I can investigate the server in more detail without breaking the working version.
I understand through the help panel that this is not currently available.
My hope is that it would not be too difficult to add this feature as it would seem to me to be very much like a server move process without the deletion of the current server.
Thanks--if this feature is feasible, please let me know.
From an NFO user since 2009.
- Vanderburg
- Former staff
- Posts: 1253
- Joined: Sat Nov 13, 2010 7:27 am
- Location: Dallas, TX
Re: Clone a VDS; request for feature
What method are you attempting now?
rsync is a powerful tool you can use to copy files from one VDS to another, using our network, instead of downloading files to your PC and then uploading them to another VDS.
rsync is a powerful tool you can use to copy files from one VDS to another, using our network, instead of downloading files to your PC and then uploading them to another VDS.
Re: Clone a VDS; request for feature
rsync is the best way to do this and is relatively easy.
Experiment by spinning up the new VDS with the same base image (for instance, if you ran Ubuntu, use that same Ubuntu version, and if you ran CentOS, use that same CentOS version), logging into the new machine, and running a command like this:
Then, reboot, and you should have a cloned system.
Experiment by spinning up the new VDS with the same base image (for instance, if you ran Ubuntu, use that same Ubuntu version, and if you ran CentOS, use that same CentOS version), logging into the new machine, and running a command like this:
Code: Select all
rsync -avH oldvdsip:/ / --delete --exclude=/proc --exclude=/sys --exclude=/dev --exclude=/var/tmp --exclude=/tmp --exclude=/etc/hostname --exclude=/etc/conf.d/hostname --exclude=/etc/ssh --exclude=/etc/sysconfig/network-scripts --exclude=/etc/sysconfig/network --exclude=/etc/network --exclude=/etc/conf.d/net.eth0
Re: Clone a VDS; request for feature
Thanks, I will give that a try. I am reasonably competent with PCs, but not with unix/linux.
Re: Clone a VDS; request for feature
Did it...now the new server is in an endless reboot cycle
I get some ubuntu selection menu on the VNC panel and can't connect via SSH with putty. I will try a power cycle.

I get some ubuntu selection menu on the VNC panel and can't connect via SSH with putty. I will try a power cycle.
Re: Clone a VDS; request for feature
Power cycle did not help,
An IO error Occurred: IO error #2031
I'm going to wipe it and start clean. If you have any suggestions, please let me know.
I did get this error after the rsync:
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1655) [generator=3.1.1]
An IO error Occurred: IO error #2031
I'm going to wipe it and start clean. If you have any suggestions, please let me know.
I did get this error after the rsync:
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1655) [generator=3.1.1]
- Vanderburg
- Former staff
- Posts: 1253
- Joined: Sat Nov 13, 2010 7:27 am
- Location: Dallas, TX
Re: Clone a VDS; request for feature
Are you able to copy to us what those previous errors are, please?
Re: Clone a VDS; request for feature
Sorry, I am not sure where to find them. Everything scrolled by very fast. Can I send the screen output to a file?
command with >> outputfile.txt should work?
I will try it on the clean install.
command with >> outputfile.txt should work?
I will try it on the clean install.
Re: Clone a VDS; request for feature
OK, there are a lot of them and this is only part of it (and sorry, I could not get spoiler tags to work), i will try to attach a file.
- Attachments
-
- errors.txt
- (139.92 KiB) Downloaded 270 times
Re: Clone a VDS; request for feature
It looks like it's storing some more runtime system things in var/lib/lxcfs/. It should be OK to skip those by adding that to the line:
--exclude=/var/lib/lxcfs
I should also ask: Are you running this as root? You'd need to do it as root.
--exclude=/var/lib/lxcfs
I should also ask: Are you running this as root? You'd need to do it as root.
Re: Clone a VDS; request for feature
OK, I added that new part to the command and don't get a list of errors. However, it is still in an endless reboot at the grub menu (I can only see it at the VNC panel).
(and I am logged in as root when I issued the command)
Any additional advice/help ?
(and I am logged in as root when I issued the command)
Any additional advice/help ?
Re: Clone a VDS; request for feature
so instead of immediately rebooting, i tried apt-get update and apt-get upgrade then rebooted and I get the attached screens shot from the VNC window
something interesting here, it won't accept my root password from the new server (which I am on), but it does take the root password from the old server at the end of that screen.
something interesting here, it won't accept my root password from the new server (which I am on), but it does take the root password from the old server at the end of that screen.
Re: Clone a VDS; request for feature
It should be using the password from the old service, yes. Since you cloned it, it has the same accounts.
You should update the server before cloning it.
Do earlier messages tell you why you are being kicked to a maintenance prompt?
Are you certain that these two started as the same Ubuntu version (16.04, for instance)?
You should update the server before cloning it.
Do earlier messages tell you why you are being kicked to a maintenance prompt?
Are you certain that these two started as the same Ubuntu version (16.04, for instance)?
Re: Clone a VDS; request for feature
On the new system I did:
reboot at first log-in then
apt-get update
apt-get upgrade
then the rsync
(then rebooted)
I didn't see any messages indicating any issues before rebooting after cloning.
The original system with lsb_release -a command says:
Distributor ID: Ubuntu
Description: Ubuntu 16.04.1 LTS
Release: 16.04
Codename: xenial
and that is what the new system is (16.04.1) LTS. On the new system, it had a package error on the update but I fixed that and then did the update.
----------
I also updated and upgraded then did the rsync, then updated and upgraded again then rebooted, but same issues.
reboot at first log-in then
apt-get update
apt-get upgrade
then the rsync
(then rebooted)
I didn't see any messages indicating any issues before rebooting after cloning.
The original system with lsb_release -a command says:
Distributor ID: Ubuntu
Description: Ubuntu 16.04.1 LTS
Release: 16.04
Codename: xenial
and that is what the new system is (16.04.1) LTS. On the new system, it had a package error on the update but I fixed that and then did the update.
----------
I also updated and upgraded then did the rsync, then updated and upgraded again then rebooted, but same issues.
Re: Clone a VDS; request for feature
It's possible that Ubuntu is getting confused about the UUID or something else changing. If so, we may need to exclude /boot, and possibly /etc/fstab or another file.
It's strange that it would, though, because our own imaging system does not need to compensate for this when it creates the initial customer OS install.
I will try to find some time to do some personal testing.
It's strange that it would, though, because our own imaging system does not need to compensate for this when it creates the initial customer OS install.
I will try to find some time to do some personal testing.