Overview
...
PowerDNS REST is a replacement for PowerDNS module and its easier to configure / maintain in long run (no ssh keys required). Procedure below describes how to migrate existing zones/products from regular PowerDNS to PowerDNS REST module.
Migration
...
- Backup your HostBill database !
- Make sure that the PowerDNS REST module is enabled.
- Create App Connection for PowerDNS REST.
- Check if the test connection returns Success.
- Connect to the database.
- You should run the query which is below.
Query
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
SET @powerdnsrest = (SELECT `id` FROM hb_modules_configuration WHERE `filename` = 'class.powerdns_rest.php'), @powerdns = (SELECT `id` FROM hb_modules_configuration WHERE `filename` = 'class.powerdns.php'), @server_group = (SELECT `id` FROM hb_server_groups WHERE module = IF(@powerdnsrest IS NOT NULL, @powerdnsrest, @powerdns)), @serv = (SELECT `id` FROM hb_servers WHERE group_id = @server_group AND `default` = 1); UPDATE hb_accounts a LEFT JOIN hb_products_modules pm ON (a.product_id = pm.product_id) SET a.server_id = @serv WHERE pm.module = @powerdns; UPDATE hb_server_groups g, hb_servers s, hb_products_modules p SET g.`module` = IF(@powerdnsrest IS NOT NULL, @powerdnsrest, @powerdns), s.`default_module` = IF(@powerdnsrest IS NOT NULL, @powerdnsrest, @powerdns), p.`module` = IF(@powerdnsrest IS NOT NULL, @powerdnsrest, @powerdns), p.`server` = @serv WHERE g.`module` = @powerdns AND s.`default_module` = @powerdns AND p.`module` = @powerdns; |
If you do not have any program to connect to the database, you can execute this query using the command line.
- Log in to the server where you have the HostBill installation.
- Then use the commands:
Code Block |
---|
mysql; |
Code Block |
---|
use {$database_name}; |
Info |
---|
Where {$database_name} is the name of the database you want to connect to. You can find the name of your database in the file public_html/includes/config.php |
Then execute the SQL query that is above.
Related modules
...