How to backup / restore VPS on new platform

allofus

New Member
Messages
183
Reaction score
2
Points
0
You can login to the VPS Control Panel and 'Create Quick Backup'.

This will create a file in /panelbackup on your VPS. /panelbackup/backup_tar.gz

Maybe not much good to you, but I did figure out a way to either use this file or create other more versitile backups that can be scheduled pretty easily.

First of all you will need to install webmin.
http://webmin.com

For ubuntu this is incredibly easy but take a look at this huge list of supported systems http://www.webmin.com/support.html


via ssh;
go to root
Code:
cd /

Code:
sudo apt-get -y install perl libnet-ssleay-perl openssl libauthen-pam-perl  libpam-runtime libio-pty-perl libmd5-perl
to install a list of dependencies

Code:
wget http://www.webmin.com/download/deb/webmin-current.deb
wget the file

Code:
sudo dpkg -i webmin_1.500_all.deb
install it

That is it, so far so good. You can now access webmin via https://yourvpsurl:10000

Code:
rm webmin_1.500_all.deb
delete the file.


I think it is a good idea to change from the default 10000 port to something else, this can be done via Webmin > Webmin Configuration > Ports and Addresses
It is the first port that you need to change and then disable the listening port!!!

There are other configs also, that is your call....


To use webmin for backup / restore;

https://yourvpsurl:10000/fsdump/ assuming you did not just change the port from 10000

Add a new backup of directory: /home

I am not even going to bother explaining the config inside fsdump (FileSystem Backup) because it really is a no-brainer.


I have setup so that a list of files and folders are zipped over to my x10corporate server. There is not a lot of need for me to backup the entire VPS because most of the 'stuff' is well just stuff, but the folders I do want keeping are always available to me via the other server.

You can use the backup.tar.gz file created by the VPS Control Panel with fsdump or create a bunch of different backups to varying degrees of magnitude, from a few config files to the entire vps.

btw I am using ubuntu 9.04 and this all works just fine.
 
Last edited:

carl6969

Community Support Team
Community Support
Messages
6,874
Reaction score
206
Points
63
Excellent post / tutorial.
I would like to add just one small thing.
I am using Webmin on my VPS but I am also using Virtualmin. Virtualmin is a Webmin addon which makes some of the routine VPS operations, (including backup), a little simpler. Whenever I wish to do a full backup on the VPS, (at least daily), I just go to the Virtualmin backup module and then select if I want the backup stored on the server itself or downloaded in a zip file to my pc (this is what I always do), and then just wait a couple of minutes for the compressed file to be compiled and downloaded. Could not be any easier.
 
Last edited:

allofus

New Member
Messages
183
Reaction score
2
Points
0
carl969 thanks for the info;

I have taken a look at virtualmin, but have yet to implement;
http://www.webmin.com/virtualmin.html

I will take a look at your recommendations and report back in due course and maybe you could give a little bit of administration feedback if there is anything less that obvious. Obvious being, read godamn it and then search and then ask...


Thanks,
MattG

ps if bbcode is exposed that is not my issue and I have reported it
 

allofus

New Member
Messages
183
Reaction score
2
Points
0
I have not had a lot of success with virtualmin.

In part because the backup features are quite elaborate and I probably should do some reading. I also have not been able to properly figure out how to do a full restore.

If I try to use the backup file created by the vps control panel I get errors that I think are caused by the fact some files are being used and locked.
 

carl6969

Community Support Team
Community Support
Messages
6,874
Reaction score
206
Points
63
I have not had a lot of success with virtualmin.

In part because the backup features are quite elaborate and I probably should do some reading. I also have not been able to properly figure out how to do a full restore.

If I try to use the backup file created by the vps control panel I get errors that I think are caused by the fact some files are being used and locked.

Odd. I have found the Virtualmin backup very easy to configure and use.
I am not quite sure what you mean by "full restore". A full restore of the entire VPS is best accomplished using the x10 supplied VPS control panel. That feature has not actually been implemented on the new control panels but I understand it will be installed soon. Full restore of domains on your VPS is possible, (and very easy IMHO), using Virtualmin. I did a full restore of several domains just today in just a couple of minutes.
But, since VPS users have full control over their setup, everybody has different operating systems, software, and configurations, so what works very well for me may or may not work well for somebody else.
 

allofus

New Member
Messages
183
Reaction score
2
Points
0
I revisited this virtualmin and when using the install.sh script on debian 5 the process is rather simple indeed.
http://www.webmin.com/vinstall.html


First of all

Code:
apt-get remove apache2 bind9 sendmail

The install script installs customised version of apache2 + configures everything to start straight away.

Code:
cd /
wget http://software.virtualmin.com/gpl/scripts/install.sh
chmod +x install.sh
./install.sh
<code>

Now go for a beer and chill. Takes about 5/ 10 mins to do it's stuff.

then open your browser and point it to https: // yourvpsip:10000 and login with your root details. I advise changing ports again for this setup.


I found it easiest to disable all features in the setup wizard because I do not use them anyway.

Then you have a backup / restore menu to the bottom left.

Virtualmin webmin, usermin are all installed.
Apache,, mysql bind fetchmail are also all installed and configured ready to use if you want to use them.

Remember to change your hostname on your VPS BEFORE you start this process if it is important to your setup.




Really easy to use and setup but the issue still remains. These backups are not backups of the VPS, but of 'stuff' added / customised on VPS and not really the restore I was hopeing for.

Again, 1 major error or a dodgy upgrade and I need to do the above again. That is a lot of beer and I do not think my liver can take it!





</code>ps... this setup does not work on fedora or ubuntu in the re-install OS options of VPS control. Works on deb 5 ad centos 5.

I have switched from ubuntu 9.04 to run this and deb seems to be faster on reboot.
 
Last edited:

allofus

New Member
Messages
183
Reaction score
2
Points
0
Let me put this into context.

Run 5 commands and have lammp setup and ready to take multiple virtual servers and all the users/ groups / domains you can throw at it. ZERO config or edits required.

Backups do cover dom/sub domains,, accounts, settings but are not a "full backup / restore" like with hypervm.

If you are newbie on VPS this is a MUST..... 101% reccomended!

The problems I was having before with vertualmin were for 2 reasons;

1 I was adding virtualmin to an existing webmin config with customised namedvirtualhosts o apache and other things.

2 It is not fully compatible with ubuntu 9.


I did a lot of pondering. Centos or Debian and I went for debian because the syntax and package management is similar if not identical to what I am used to with ubuntu. Every time i try to use centos I get frustrated with the different commands and 'other way' of doing things and abandon it instead of keep trying to re-learn all I have learned so far.

I vow to never use centos EVER AGAIN. Had I started with it, maybe I would not feel the same!
 
Last edited:

carl6969

Community Support Team
Community Support
Messages
6,874
Reaction score
206
Points
63
Let me put this into context.
Backups do cover dom/sub domains,, accounts, settings but are not a "full backup / restore" like with hypervm.

I am missing something. Perhaps I do not fully understand what you mean by "full backup / restore". When I first started working with VPS, (and making many mistakes), I did backups and restore with Virtualmin with great success. The only things that could not be restored this way were the OS and Virtualmin itself. Perhaps HyperVm did have that capability. Never did actually try it.

If you are newbie on VPS this is a MUST..... 101% reccomended!

Absolutely correct on that point - newbie or highly experienced - full backups should be done at least daily as well as before making any changes to the server IMHO. Some of the folks on Free Hosting have been learning this lesson the hard way last few weeks.

The problems I was having before with vertualmin were for 2 reasons;
1 I was adding virtualmin to an existing webmin config with customised namedvirtualhosts o apache and other things.
2 It is not fully compatible with ubuntu 9.

To properly setup Webmin, (or any other server management tool I have looked at), you needs to start with a "blank slate" - nothing installed but the OS. After Webmin is installed then Virtualmin can be added on to (somewhat) automate the server management.
My first choice fo operating system on my VPS was Ubuntu because I use it on my PC and was somewhat familiar with it. But I did some homework and discovered Ubuntu did not have some capabilities I wanted at the time, (don't remember what now), so I went with Centos.

I vow to never use centos EVER AGAIN. Had I started with it, maybe I would not feel the same!

This is one of those things like the new VPS Control Panel. Some folks were very comfortable with the old LXAdmin and were not happy with the new Control Panel, despite the fact that a change had to be made for security reasons. I have been using CENTOS for a long time and am very comfortable with it and would probably be completely lost on another OS even if somebody convinced me it was better.

Interesting and educational discussion.
Thanks.
 

allofus

New Member
Messages
183
Reaction score
2
Points
0
I think HyperVM was the last control panel for VPS on x10.
LXAdmin/kloxo was an option similar to webmin/virtualmin that was only compatible with 1 particular pre-configured distro of centos 5 which was about 3GB when installed but maybe this is just a nameske tbh. but I think the host-in-a-box was specific to that 1 setup and really this does not matter any more since it is history.

Lxadmin is still featured in the list of centos distros in the new cpanel along with 4 other versions of centos so I think it likely that any security issue was with hyperVM not lxadmin.

I do recall a story flying around about the owner/dev of hyperVM killing himself thus leaving hyperVM without a dev route and up in the air.

hyperVM was feature rich and there were lots more distros to choose from.
Gentu has gone, suze is gone ubuntu 8 also and I think some others too.

File share, port management, ssh key control + password /root access control

In hyperVM there was a manual /scheduled backup feature which stopped the vps for about 10 seconds and then took a 'full copy, OS and all.

To restore one would pick the backup either from the list or using ftp to import. hyperVM would then restore an exact copy from the file provided.

That is what I mean by Full backup / restore and having a second account with x10 meant I could ftp backups over to the second account to go beyond the allotted 1 backup. The same applies with virtualmin / webmin, but these backups are only partial and should things go really pear shaped one would need to rebuild the platform before even considering using the backup.

There has to be a way to use the backup provided by the new control panel, else what is the point of having the feauture?

In virtualmin / webmin / fsdump you have the option to run commands before / after backup and also restore.

I use this feature to stop our web / voip / shoutcast servers before backup so the files are accessible for copy.

It is quite feasable that with the proper commands a 'full backup' could be used. Some command to halt or run on boot and reboot but I do not know where to start looking on this one!

I am not sure it is even possible to do this without causing the VPS to stop and if it is stopped virtualmin stops with it.

chicken + egg syndrome
 

allofus

New Member
Messages
183
Reaction score
2
Points
0
Having used the 'fresh virtualmin install' method for a couple of weeks I though it appropriate to publish the fact that it has not let me down once.
get the installer (http://www.webmin.com/vinstall.html)
Code:
wget [url]http://software.virtualmin.com/gpl/scripts/install.sh[/url]
Code:
chmod +x solaris-install.sh
./solaris-install.sh

The rest is up to you, but the rest does not include config of DNS, Apache, MySql

Virtualmin > Backup and Restore > Backup Virtual Servers >
Backup your pre-installed sub/domains and account infor including user/pwd and mysql

Webmin > Webmin > Backup Configuration Files >
backup your existing webmin configuraton for later retrieval

Webmin > System > Filesystem Backup >
backup any / dir you choose, either individually
HTML:
/home

or

multiple

Code:
/home
/usr
/share
/etc

If you install webmin first you might find the config to be rather complicated, but if you opt for the virtualmin installer from a fresh OS the ability to backup and restore is apparent from the get-go.
 
Top