Saturday, October 8, 2011

how to restore xen vps from tar backup

Here we discuss how to restore a xen vps or virtual private server or container for a .tar backup file.
For this, You must have enabled ftp backups and the backup should be there in a remote ftp backup server.

And suppose you have a backup as this in the backup server
569-xen-vm601-1.tar.gz
id=569
CID/XID=vm601

Now go to the node(server) where vps is created and run the following command.

[root@xendell ~]# /scripts/ftp-restore
/usr/lib/php/modules/dbase.so: cannot open shared object file: No such file or directory in Unknown on line 0

Checking connectivity to FTP backup server...
###### Pre Test Succeeded ######
SolusVM Virtual Server Restore       |      0 to quit
=====================================================

Enter the Vserver ID of a Virtual Server: 569
[this is the id of the vps not CID/XID]
Found virtual server, Please wait.....

Downloading xen dat...
Downloading xen cfg...
Downloading xen backup. This may take a while...

Filename: config-569.dat

/tmp/569-xen-vm601-1.tar.gz:                           596.49 MB   70.17 MB/s
/tmp/569-xen-vm601-1.tar.gz:                           596.49 MB   70.17 MB/s
Check no virtual servers are running with the same ID...
Determining disk size...
Determining swap size...
Creating logical volumes...
Creating config file...
Restoring backup. This may take a while...
Booting restored virtual server...
Cleaning up...
Restore complete.

Thats it. Vps restored.

Sunday, October 2, 2011

Error: Kernel image does not exist: /boot/solus-vmlinuz

You may get this error while starting a xen vps.

[root@test ~]# xm create /home/xen/vm302/vm302.cfg
Using config file "/home/xen/vm302/vm302.cfg".
Error: Kernel image does not exist: /boot/solus-vmlinuz

Solution:

[root@test~]# php /usr/local/solusvm/includes/xenkernel.php
Making SolusVM initrd...
Setting kernel links...
Kernel setup completed.
[root@test~]#

Now try:

[root@test~]# xm create /home/xen/vm302/vm302.cfg
Using config file "/home/xen/vm302/vm302.cfg".
Started domain vm302
[root@test~]#