MRatWork Forum by Mustafa Ramadhan

Sawo Project - Kloxo-MR Discussions => Kloxo-MR Tips and Tricks => Topic started by: insanity on 2013-03-17, 19:56:53

Title: Backup from Kloxo 6.1.12 and Import in Kloxo MR
Post by: insanity on 2013-03-17, 19:56:53
Hello,
Is there a way to backup all data from Kloxo 6.1.12 (clients, mysql db, emails accounts(with all emails inside), etc.) and restore this data in Kloxo-MR ? Or i need to transfer one by one everything?
Title: Re: Backup from Kloxo 6.1.12 and Import in Kloxo MR
Post by: MRatWork on 2013-03-17, 20:06:46
Just enough backup from Kloxo 6.1.12 and then restore in Kloxo-MR.

The step on Kloxo:
1. Download https://github.com/mustafaramadhan/klox ... ckup-patch (https://github.com/mustafaramadhan/kloxo/raw/dev/kloxo/pscript/backup-patch) and place inside '/script' directory on Kloxo server
2. Run 'sh /script/backup-patch; sh /script/restart' and then from Kloxo panel go to 'backup home' for backup process

Note:
1. backup-patch make Kloxo backup process without possible appear 'Could_not_zip_dir' (that mean backup fail)
2. For Centos 6, don't use MariaDB instead MySQL (no matter mysql/mysql51/mysql55)
Title: Re: Backup from Kloxo 6.1.12 and Import in Kloxo MR
Post by: insanity on 2013-03-17, 20:11:34
Okay, thank you, but still, i need to backup every user one by one right? And there is one more problem. It seems WHMCS find all clients in Kloxo on some ID, if i delete this user and add it again, WHMCS module stop work for this user (if you try to change password from WHMCS or WHMCS system try to terminate this user...)
Title: Re: Backup from Kloxo 6.1.12 and Import in Kloxo MR
Post by: MRatWork on 2013-03-17, 22:36:46
I don't know WHMCS but much better backup-user especially if you have huge data (website and database). If not, enough backup for all via admin.
Title: Re: Backup from Kloxo 6.1.12 and Import in Kloxo MR
Post by: insanity on 2013-03-18, 01:51:50
When i make backup for user on v.6.5.0.c.2013031301. I receive email: Kloxo Backup Succeeded for 'user' but there is no backup in /home/kloxo/client/user/_backup

Same is in /home/kloxo/selfbackup/_backup - No self backups at all.
Title: Re: Backup from Kloxo 6.1.12 and Import in Kloxo MR
Post by: MRatWork on 2013-03-18, 02:40:26
Update to latest upload.
Title: Re: Backup from Kloxo 6.1.12 and Import in Kloxo MR
Post by: insanity on 2013-03-18, 02:41:14
I already update, in all user folders appear some file with name --ignore-failed-read
Title: Re: Backup from Kloxo 6.1.12 and Import in Kloxo MR
Post by: MRatWork on 2013-03-18, 02:44:28
Wait. Look like something wrong using '--ignore-failed-read' in Centos 5 but needed for Centos 6 to make sure tarring always sucessful.
Title: Re: Backup from Kloxo 6.1.12 and Import in Kloxo MR
Post by: MRatWork on 2013-03-18, 02:49:56
Nothing wrong with 6.5.0.c.2013031701 (latest upload) but your 6.5.0.c.2013031301 may have this issue.
Title: Re: Backup from Kloxo 6.1.12 and Import in Kloxo MR
Post by: insanity on 2013-03-18, 02:52:38
Okay i run sh /script/update; sh /script/upcp what else? or i need ot dw sh-installer again and make new install?


A.2. Install/reinstall/upgrade -- data not destroyed with this fork - for existing kloxo (6.1.x), run 'sh /script/update' first.
Code:
# remove old script and go to
cd /tmp
rm -rf /tmp/kloxo; mkdir /tmp/kloxo
rm -f ./kloxo-mr-dev.sh


# get kloxo packer from github
wget https://github.com/mustafaramadhan/klox ... -mr-dev.sh (https://github.com/mustafaramadhan/kloxo/raw/dev/kloxo/install/kloxo-mr-dev.sh) --no-check-certificate

# install kloxo
sh ./kloxo-mr-dev.sh
Title: Re: Backup from Kloxo 6.1.12 and Import in Kloxo MR
Post by: MRatWork on 2013-03-18, 03:02:46
Because still 'c' (candidate) version, need running all step of A.2. Script of '/script/update' and '/script/upcp' not work until 'f' (final) version release.
Title: Re: Backup from Kloxo 6.1.12 and Import in Kloxo MR
Post by: insanity on 2013-03-18, 03:17:03
Bad news for me. I'm on CloudLinux and now when i try to install kloxo again i see this error:

Installing as "root"         OK
Operating System supported   OK
SELinux disabled             OK
Yum installed                OK
This Operating System is currently *NOT* supported.

I guess i need to switch first to CentOS then follow these steps :)
Title: Re: Backup from Kloxo 6.1.12 and Import in Kloxo MR
Post by: MRatWork on 2013-03-18, 03:50:22
On next release I will remove identified for Centos/Redhat. I hope all OS with yum-based always sucessfully for Kloxo-MR installed. Work or not depend on OS itself.
Title: Re: Backup from Kloxo 6.1.12 and Import in Kloxo MR
Post by: MRatWork on 2013-03-18, 03:53:45
For your server, try disabled on 'installer.sh' with:
Code: [Select]
# Check if OS is RHEL/CENTOS/FEDORA.
#if [ ! -f /etc/redhat-release ] ; then
# echo -en "Operating System supported  " $C_NO
# echo -e "anSorry, only RedHat EL and CentOS are supported by $APP_NAME at this time.nnAborting ...n"
# exit $E_NOSUPPORT
#else
# echo -en "Operating System supported  " $C_OK
#fi
Title: Re: Backup from Kloxo 6.1.12 and Import in Kloxo MR
Post by: insanity on 2013-03-18, 03:59:20
Installing as "root"         OK
SELinux disabled             OK
Yum installed                OK
This Operating System is currently *NOT* supported.

I see this error is in installer.php

function find_os_version()
{
   // list os support
   $ossup = array('redhat' => 'rhel', 'fedora' => 'fedora', 'centos' => 'centos');

   $osrel = null;

etc...

So i think it must be included in $ossup = array....
Title: Re: Backup from Kloxo 6.1.12 and Import in Kloxo MR
Post by: MRatWork on 2013-03-18, 04:03:10
Try modified 'installer.php' with:
Code: [Select]
/*
if (!char_search_beg($osversion, "centos") && !char_search_beg($osversion, "rhel")) {
print("Kloxo is only supported on CentOS 5 and RHEL 5n");

exit;
}
*/
Title: Re: Backup from Kloxo 6.1.12 and Import in Kloxo MR
Post by: insanity on 2013-03-18, 04:05:37
Yes i already do that, and now kloxo install. But lets wait until install finish
Title: Re: Backup from Kloxo 6.1.12 and Import in Kloxo MR
Post by: insanity on 2013-03-18, 04:11:38
Congratulations. Kloxo-MR has been installed succesfully as master

Yes this tip work :)

but error at the end
[root@backupserver kloxo]# ../bin/common/function.sh: line 32: 15643 Terminated              $__path_php_path $__path_server_path $string > /dev/null 2>&1
Title: Re: Backup from Kloxo 6.1.12 and Import in Kloxo MR
Post by: MRatWork on 2013-03-18, 04:40:36
Don't care about '[root@backupserver kloxo]# ../bin/common/function.sh: line 32: 15643 Terminated $__path_php_path $__path_server_path $string > /dev/null 2>&1'.

Ok, I will remove identified os and just enough identified 'yum'.
Title: Re: Backup from Kloxo 6.1.12 and Import in Kloxo MR
Post by: insanity on 2013-03-18, 04:45:21
Yes, it will be enougth. Now we move to the next.

(4)Interrupted system call: FastCGI: comm with server "/home/*****  in /var/log/httpd/error_log
3 or 4 page refresh and its show 500 Internal Server Error

I set PHP_FCGI_MAX_REQUESTS=0 but no changes.
Title: Re: Backup from Kloxo 6.1.12 and Import in Kloxo MR
Post by: MRatWork on 2013-03-18, 04:47:32
6.5.0.c.2013031704 already without identify os (just yum exist or not).
Title: Re: Backup from Kloxo 6.1.12 and Import in Kloxo MR
Post by: MRatWork on 2013-03-18, 04:49:04
It's another issue. Have you run 'sh /script/fixweb; sh /script/restart-services' after update?.
Title: Re: Backup from Kloxo 6.1.12 and Import in Kloxo MR
Post by: insanity on 2013-03-18, 04:50:04
Yes and i reboot the server. Now i'm looking where can be this issue.
Title: Re: Backup from Kloxo 6.1.12 and Import in Kloxo MR
Post by: insanity on 2013-03-18, 05:16:20
Could you please change this in installer.php
from:
Code: [Select]
// list os support
$ossup = array('redhat' => 'rhel', 'fedora' => 'fedora', 'centos' => 'centos');
to:
Code: [Select]
// list os support
$ossup = array('redhat' => 'rhel', 'fedora' => 'fedora', 'centos' => 'centos', 'cloudlinux' => 'cl');

Otherwise installer check only for rhel fc and centos.
Title: Re: Backup from Kloxo 6.1.12 and Import in Kloxo MR
Post by: MRatWork on 2013-03-18, 05:23:56
It's unnecessary. Just enough disable os identified. Without os identified, it's possible other oses based-on yum for installing Kloxo-MR (in certain condition with little trick).
Title: Re: Backup from Kloxo 6.1.12 and Import in Kloxo MR
Post by: insanity on 2013-03-18, 05:25:42
I just try reinstall kloxo and i saw same error. This Operating System is currently *NOT* supported.

When i add cloudlinux error dissapear and kloxo start install
Title: Re: Backup from Kloxo 6.1.12 and Import in Kloxo MR
Post by: insanity on 2013-03-18, 05:41:39
And the last thing from me for this night.
When add resource plan and set everything to unlimited.
Then add some user with this plan, phpMyAdmin button) not show for this user. (I saw this problem and on Kloxo official)
Title: Re: Backup from Kloxo 6.1.12 and Import in Kloxo MR
Post by: MRatWork on 2013-03-18, 05:42:55
6.5.0.c.2013031704+ already disable os detect.
Title: Re: Backup from Kloxo 6.1.12 and Import in Kloxo MR
Post by: MRatWork on 2013-03-18, 05:46:15
Already found 'phpMyAdmin' on 'Domain' group for user login.
Title: Re: Backup from Kloxo 6.1.12 and Import in Kloxo MR
Post by: insanity on 2013-03-26, 01:10:41
Restore failed:

Code: [Select]
Last Restore Status:   program_interrupted
Last Restore Status:   Restore failed due to objectclassname_doesnt_match: :
Title: Re: Backup from Kloxo 6.1.12 and Import in Kloxo MR
Post by: insanity on 2013-03-26, 01:21:30
Solution:

in /usr/local/lxlabs/kloxo/httpdocs/htmllib/phplib/lib/lxclass.php

find:
Code: [Select]
if ($ob->getClName() !== $this->getClName()) {
throw new lxException('objectclassname_doesnt_match', '');
}

and replace with:
Code: [Select]
if ($ob->getClName() !== $this->getClName()) {
// throw new lxException('objectclassname_doesnt_match', '');
}
Title: Re: Backup from Kloxo 6.1.12 and Import in Kloxo MR
Post by: MRatWork on 2013-03-26, 01:44:28
Yes, it's old issue and you will found 'TODO' remark since Kloxo 6.1.7.