This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Move multiple sites under single plan to combined plan?
#1
Move multiple sites under single plan to combined plan?
Okay. I have a client with several domains setup under individual plans. She has now reached a point where it would be more economical for her to upgrade to a plan that allows multiple domains. Is there an easy way to move her current domains to a new plan without having to backup/export? What would be the recommended way to handle a situation like this?

Thanks!
Reply
Thanks given by:
#2
RE: Move multiple sites under single plan to combined plan?
Either you upgrade the current plan or change the USER PACKAGE.

You can edit the user easily, under client management.

M B
No support using PM (Auto adding to IGNORE list!), use the forum. 
How to ask

200$ free to start your VPS 60 days credit
Reply
Thanks given by:
#3
RE: Move multiple sites under single plan to combined plan?
My problem is that I have a Plan One. That allows one domain. She now has four domains on four plans -- Plan One. Unfortunately, Sentora won't allow the same email address on more than one account and that is causing a problem for her. So she currently has four accounts under client management -- one for each domain. I also have a Plan Six which allows up to 5 domains. I want to set her up on Plan Six and move all four domains to that plan. So instead of having four logins to four different sites, she would have one login to access all her sites in the control panel.

So, I guess what I would do is upgrade one of the accounts to Plan Six, but then how do I move the other sites to that new account?
Reply
Thanks given by:
#4
RE: Move multiple sites under single plan to combined plan?
There is no easy way at this point, although Test of MySupport MOD may be faster.
There are three ways of doing this:

1:
You could upgrade one account and she can manually move all of her sites and databases manually to the upgraded account. You will need to use the Deleted Records Manager module to help her out. Once she has backed up all the sites and databases you would delete the old accounts normally, then use Deleted Records Manager to clean up the database of all her old information. Then she can re-create the domains and ftp, etc. on the new account.

-OR-

2:
Untested!
(Make a backup of YOUR entire panel sentora_core database!)
Then you could go through each table and change *_acc_fk where her old account number is and change it to the new or upgraded account number and move all domain folders from the old accounts to the new one and run the daemon.

In theory, you are manually re-assigning the old account's information to the new account.

For example, you go into the x_accounts table and find her new (or upgraded) account ID (ac_id_pk) and write it down and do the same with her old account numbers.
Then, you would go into the next table (x_aliases) and look for her old account numbers in al_acc_fk and change them all to her new account number. Do this for every DB table as needed.

You could make a small DB query that you could execute on each database table.
Something like:
Code:
UPDATE x_alias SET al_acc_pk=new# WHERE al_acc_pk=old#
You would need to edit this for every table but it will change all the references in that table instead of manually changing each individual one. (Remember to replace new# with her new/upgraded account and old# with her old account number)
So the next one would be:
Code:
UPDATE x_bandwidth SET bd_acc_pk=new# WHERE bd_acc_pk=old#
And so on.

-OR-

3:
You could even write a php script that would do this for you.
(Make a backup of YOUR entire panel sentora_core database!)
You would put this file in your /etc/sentora/panel/ folder
and run it by entering: http://panel.domain.com/move_client.php

Example move_client.php file: (delete this file after you use it!!)
PHP Code:
<?php
// set account number variables
$old_account "old#"// change from this account number
$new_account "new#"// change to this account number

// get DB info
include('cnf/db.php');

// DB connect
$conn = new PDO("mysql:host=$host;dbname=$dbname"$user$pass);
// set the PDO error mode to exception
$conn->setAttribute(PDO::ATTR_ERRMODEPDO::ERRMODE_EXCEPTION);

// do the table updates
// update aliases
$sql "UPDATE x_alias SET al_acc_pk='$new_account' WHERE al_acc_pk='$old_account'";
$stmt $conn->prepare($sql);
$stmt->execute();

// update bandwidth
$sql "UPDATE x_bandwidth SET bd_acc_pk='$new_account' WHERE al_acc_pk='$old_account'";
$stmt $conn->prepare($sql);
$stmt->execute();

// update cronjobs
$sql "UPDATE x_cronjobs SET ct_acc_pk='$new_account' WHERE al_acc_pk='$old_account'";
$stmt $conn->prepare($sql);
$stmt->execute();

//update distribution lists
$sql "UPDATE x_distlists SET dl_acc_pk='$new_account' WHERE al_acc_pk='$old_account'";
$stmt $conn->prepare($sql);
$stmt->execute();

[
the rest of the updates here]

$conn null;
?>
There may be an easier way, this is just a basic idea.

I haven't had much time lately, but I will plan to make a module that will accomplish this task. I think there is one similar, but it is for reseller accounts (I think).
-TGates - Project Council

SEARCH the Forums or read the DOCUMENTATION before posting!
Support Sentora and Donate: HERE

Find my support or modules useful? Donate to TGates HERE
Developers and code testers needed!
Contact TGates for more information
Reply
Thanks given by:


Possibly Related Threads…
Thread Author Replies Views Last Post
How to run multiple version PHP with Apache (use Sentora panel) on Centos ??? BigBang 4 9 ,316 12-23-2020, 03:31 PM
Last Post: djkashdui1
Having both HTTP & HTTPS (Port 443 and Port 80) sites on a server dsmarter 14 46 ,260 08-22-2020, 02:49 PM
Last Post: kenzopoker1
slow sites kewldude12 0 2 ,324 07-20-2020, 04:40 AM
Last Post: kewldude12

Forum Jump:


Users browsing this thread: 1 Guest(s)