Applies to all DNS Manager versions!
This tutorial explains how to dump zones from a Plesk Windows server.
The recommendations included here apply if you need to use the Remote update function of DNSManager and the zones are held on a Plesk Windows server.
Step-by-step guide
Plesk Windows server
All you need to do is add a new MySQL user that will be allowed to connect remotely to the Plesk database. Here's how:
Connect to MySQL and run the command below:
grant select on <Plesk_database_name>.* to '4psadnsreader'@'<IP address of the DNSManager server>' identified by '<password used to connect>'; flush privileges;
Then replace the following:
<Plesk_database_name> with the database name, usually psa
<IP address of the DNSManager server> with the IP address from where the dump script will connect to the Plesk server
<password used to connect> - with the password used for connection
DNSManager server
- Log in to your DNS Manager server using your favorite SSH console (e.g. Putty).
Go to
DNSMANAGER_ROOT_D/remote/plesk/
cd /usr/local/dnsmanager/remote/plesk
In this folder there's a script called
plesk_export.sh
. Make a copy of this file where all the changes will be applied.cp plesk_export.sh plesk_windows_export.sh
Open
plesk_windows_export.sh
in your favorite text editor and setdump_file
as follows.dump_file="/usr/local/dnsmanager/admin/htdocs/dump_full_recs_winsrv.txt"
Search for the
get_config()
function and replace it with the one below.get_config() { #check local vars [ -n "$dump" ]||dump="masters" [ -n "$masters2slaves" ]||masters2slaves="yes" [ -n "$dump_masters" ]||dump_masters="no" [ -n "$dump_allow_transfers" ]||dump_allow_transfers="no" [ -n "$dump_soa" ]||dump_soa="no" [ -n "$dump_reverse" ]||dump_reverse="yes" [ -n "$ignore_dns_zones_status" ]||ignore_dns_zones_status="no" mysql_dir='/usr/bin' admin_user='4psadnsreader' admin_passwd='<Password for connection to the Plesk serevr>' server_host='<IP address of the Plesk Widows server>' server_port='8306' OLDVER='0' domainaliases='domain_aliases' }
Replace
admin_passwd
with the correct password andserver_host
with the IP address of the Plesk Windows server. In case the port where MySQL listens to the Plesk server was changed, make sure the correct port number is added toserver_port
parameter.Save changes, then run the following command:
sed -i 's/-uadmin/-u$admin_user/g; s/-p$admin_passwd/-p$admin_passwd -h$server_host -P$server_port/g' plesk_windows_export.sh
Run the dump script, then log in to DNSManager and add a new remote update location.
https://<your_DNSManager_server_IP_address>:8550/dump_full_recs_winsrv.txt
Related articles
Except where otherwise noted, content in this space is licensed under a Creative Commons Attribution 4.0 International.