[How to] How to migrate Plesk and Sitebuilder content retaining Plesk and Sitebuilder integration

Created:

2016-11-16 12:54:21 UTC

Modified:

2017-08-16 18:32:42 UTC

0

Was this article helpful?


Have more questions?

Submit a request

[How to] How to migrate Plesk and Sitebuilder content retaining Plesk and Sitebuilder integration

Applicable to:

  • Plesk 12.5 for Linux
  • Plesk Sitebuilder for Linux
  • Plesk 9.x for Linux

Symptoms

Integration of Parallels Plesk Sitebuilder and Parallels Plesk Panel means that:

  1. Sitebuilder submenu exists in the left menu of Plesk Control Panel
  2. Sitebuilder support is enabled for Plesk domains via

    Plesk > Domains > DOMAIN.NAME > Setup > Create and publish Web site using Sitebuilder > Ok

    When enabled new site with same name is created in Parallels Plesk Sitebuilder that is configured to be published to domain's httpdocs directory.

  3. Button Sitebuilder Wizard opens domain for editing in Sitebuilder wizard.

How to migrate the data to new server retaining Plesk and Sitebuilder integration?

Resolution

Use the steps below to migrate Plesk and Sitebuilder content retaining Plesk and Sitebuilder integration.

  1. Setup new Parallels Plesk server and migrate Plesk data using Plesk Migration Manager ( Server > Migration Manager ) or Import Mode migration .

  2. Setup new Parallels Plesk Sitebuilder with all modules, templates and locales of the same version that are installed on source Parallels Plesk Sitebuilder . Migrate sites directory, configuration file and database to new server. Refer to this article for details about Sitebuilder migration procedure.

  3. Register new Parallels Plesk Sitebuilder in new Parallels Plesk Panel through Plesk > Server > Sitebuilder Support . Enter valid credentials of Sitebuilder administrator and click OK.

    This creates new Sitebuilder plan " Plan for all user creating from PLESK.FULL.HOSTNAME " that will be assigned to all Plesk clients when Sitebuilder support is enabled for them. Also submenu Sitebuilder appears in Plesk left menu.

  4. Enabled Sitebuilder support for all Plesk clients usual way: Plesk > Clients > CLIENT.NAME > Preferences > Create a corresponding user account in Sitebuilder > OK

    This creates new Sitebuilder resellers with names:

    @CLIENT1.LOGIN@PLESK.FULL.HOSTNAME
    @CLIENT2.LOGIN@PLESK.FULL.HOSTNAME
    @CLIENT3.LOGIN@PLESK.FULL.HOSTNAME
    ...

    Where CLIENT1.LOGIN is login of client CLIENT.NAME and PLESK.FULL.HOSTNAME is full hostname of new Parallels Plesk Panel.

  5. To restore links between Plesk domains and Sitebuilder sites it is needed to activate Sitebuilder support for Plesk domains usual way. However Sitebuilder site with name DOMAIN.NAME already exists and so Sitebuilder support cannot be activated for Plesk domain DOMAIN.NAME anew usual way. Check that site with name DOMAIN.NAME already exists in Sitebuilder database:

    mysql> select site_id, alias, user_id from sitebuilder3.site where alias ='`DOMAIN.NAME`';
    +----------------------------------+-------------+---------+
    | site_id | alias | user_id |
    +----------------------------------+-------------+---------+
    | a0293da2f54fef29e22c1a894df4ba4e | DOMAIN.NAME | 35 |
    +----------------------------------+-------------+---------+
    1 row in set (0.00 sec)

    mysql>
  6. Sitebuilder site DOMAIN.NAME was copied during migration. However it is not linked to Plesk domain DOMAIN.NAME . With instructions below we are going to rename Sitebuilder site, activate Sitebuilder support for Plesk domain usual way and restore the link between domain and site.

    Rename site DOMAIN.NAME to DOMAIN.NAME .old in Sitebuilder database:

    mysql> update sitebuilder3.site set alias='DOMAIN.NAME.old' where site_id='a0293da2f54fef29e22c1a894df4ba4e';
    Query OK, 1 row affected (0.01 sec)
    Rows matched: 1 Changed: 1 Warnings: 0

    mysql>

    Activate Sitebuilder support for Plesk domain DOMAIN.NAME usual way through Plesk > Domains > DOMAIN.NAME > Setup > Create and publish Web site using Sitebuilder > Ok . That is possible because site with name DOMAIN.NAME does not exist now, it was renamed to DOMAIN.NAME .old.

    When Sitebuilder support is activated for Plesk domain DOMAIN.NAME this creates new Sitebuilder site ( 9fc19c1531dc647deb60a7232a7e2b33 ) with name DOMAIN.NAME . You may check this with the command below.

    mysql> select site_id, alias, user_id  from sitebuilder3.site where alias like 'DOMAIN.NAME%';
    +----------------------------------+-----------------+---------+
    | site_id | alias | user_id |
    +----------------------------------+-----------------+---------+
    | a0293da2f54fef29e22c1a894df4ba4e | DOMAIN.NAME.old | 35 |
    | 9fc19c1531dc647deb60a7232a7e2b33 | DOMAIN.NAME | 35 |
    +----------------------------------+-----------------+---------+
    2 rows in set (0.00 sec)

    mysql>

    Configuration of Plesk domain and Sitebuilder site integration is stored in table SBSites of Plesk database. Here is configuration of Sitebuilder support for domain DOMAIN.NAME in Plesk database:

    mysql> select domains.name, SBSites.id, SBSites.sb_site_id from psa.domains, psa.SBSites where virtualHost_id=domains.id;
    +-------------+----+----------------------------------+
    | name | id | sb_site_id |
    +-------------+----+----------------------------------+
    | DOMAIN.NAME | 3 | 00fe1f8af6d2bebfdd13f770bfbff04b |
    +-------------+----+----------------------------------+
    1 rows in set (0.00 sec)

    mysql>

    In Sitebuilder database site DOMAIN.NAME has id a0293da2f54fef29e22c1a894df4ba4e , however in Plesk database domain DOMAIN.NAME is linked to Sitebuilder site with id 00fe1f8af6d2bebfdd13f770bfbff04b .

  7. Correct site id for domain DOMAIN.NAME in Plesk database:

    mysql> update psa.SBSites set sb_site_id='a0293da2f54fef29e22c1a894df4ba4e' where id=3;
    Query OK, 1 row affected (0.00 sec)
    Rows matched: 1 Changed: 1 Warnings: 0

    mysql>

    Where 3 is SBSites.id and a0293da2f54fef29e22c1a894df4ba4e is uuid of old Sitebuilder site.

    Now when you click button Sitebuilder Wizard in Parallels Plesk Panel ( Plesk > Domains > DOMAIN.NAME > Sitebuilder wizard ) site DOMAIN.NAME is opened in Sitebuilder wizard.

  8. Delete new site DOMAIN.NAME from Parallels Plesk Sitebuilder usual way Plesk > Sitebuilder > Sites > locate and mark enabled site DOMAIN.NAME > Delete

  9. Rename site DOMAIN.NAME .old to DOMAIN.NAME in Sitebuilder database:

    mysql> update sitebuilder3.site set alias='DOMAIN.NAME' where site_id='a0293da2f54fef29e22c1a894df4ba4e';
    Query OK, 1 row affected (0.00 sec)
    Rows matched: 1 Changed: 1 Warnings: 0

    mysql>

Integration of Plesk domain DOMAIN.NAME and Sitebuilder site DOMAIN.NAME has been corrected.

Have more questions? Submit a request
Please sign in to leave a comment.