Date: Fri, 29 Mar 2024 11:07:37 +0000 (GMT) Message-ID: <1312671004.4727.1711710457588@wiki.4psa.com> Subject: Exported From Confluence MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_Part_4726_223918899.1711710457588" ------=_Part_4726_223918899.1711710457588 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Location: file:///C:/exported.html
Applies to all DNS Manager versions!
This tutorial explains how to dump zones from a Plesk Windows server.&nb= sp;
The recommendations included here apply if you need to use the
All you need to do is add a new MySQL user that will be allowed to conne= ct remotely to the Plesk database. Here's how:
Connect to MySQL and run the command below:
grant s= elect on <Plesk_database_name>.* to '4psadnsreader'@'<IP address = of the DNSManager server>' identified by '<password used to connect&g= t;'; flush privileges;
Then replace the following:
<Plesk_database_name> with the database = name, usually psa
<IP address of the DNSManager server> wi= th the IP address from where the dump script will connect to the Plesk serv= er
<password used to connect> - with the pa= ssword used for connection
Go to DNSMANAGER_ROOT_D/remote/plesk/
cd /us= r/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 ples= k_export.sh plesk_windows_export.sh
Open plesk_windows_export.sh
in your favorite text edit=
or and set dump_file
as follows.
dump_fi= le=3D"/usr/local/dnsmanager/admin/htdocs/dump_full_recs_winsrv.txt"
Search for the get_config()
function and replace i=
t with the one below.
get_con= fig() { =20 #check local vars [ -n "$dump" ]||dump=3D"masters" [ -n "$masters2slaves" ]||masters2slaves=3D"yes" [ -n "$dump_masters" ]||dump_masters=3D"no" [ -n "$dump_allow_transfers" ]||dump_allow_transfers=3D"no" [ -n "$dump_soa" ]||dump_soa=3D"no" [ -n "$dump_reverse" ]||dump_reverse=3D"yes" [ -n "$ignore_dns_zones_status" ]||ignore_dns_zones_status=3D"no" =20 mysql_dir=3D'/usr/bin' admin_user=3D'4psadnsreader' admin_passwd=3D'<Password for connection to the Plesk serevr>' server_host=3D'<IP address of the Plesk Widows server>' server_port=3D'8306' OLDVER=3D'0' domainaliases=3D'domain_aliases' }
Replace admin_passwd
with the correct password and server_port
parameter.
Save changes, then run the following co= mmand:
sed -i = 's/-uadmin/-u$admin_user/g; s/-p$admin_passwd/-p$admin_passwd -h$server_hos= t -P$server_port/g' plesk_windows_export.sh
Run the dump script, then log in to DNS= Manager and add a new remote update location.
https:/= /<your_DNSManager_server_IP_address>:8550/dump_full_recs_winsrv.txt= pre>