Date: Fri, 29 Mar 2024 09:36:29 +0000 (GMT) Message-ID: <514534658.4705.1711704989243@wiki.4psa.com> Subject: Exported From Confluence MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_Part_4704_1229882283.1711704989242" ------=_Part_4704_1229882283.1711704989242 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Location: file:///C:/exported.html
This article explains how to perform data migration between two = DNSManager servers avoiding the XML export - import option from the web int= erface. The indications included here are recommended in case you want= to move your installation onto a new server, or if your server suffered a = failure and you want to import your data on a new server.
To migrate DNS Manager between two servers, follow the steps below and&n= bsp;keep in mind that this operation can only be done manually.
There are two ways you can perform a migration:
The dbdump script uses the /etc/dnsmanager/dnsmanager.conf file to read =
the location of the backups. By default DUMPS_D from local.conf is set to /=
var/lib/dnsmanager/dumps.
In case this was modified, please note that the database backup will no lo=
nger be carried out in /var/lib/dnsmanager/dumps/dnsmanagermysql.daily.dump=
.0.gz.
The database login username is taken from the /etc/dnsmanager/dnsmanager= .conf using the following command:
cat /etc/dnsmanager/dnsmanager.conf | grep DB_USER | awk '{print $2}'<= /pre>
If you haven't already installed the latest version of DNSManager, do it= now using the Command Line Installer.
Once installed, take the following steps:
Obtain the value below. This value will be called NEW_DB_U= SER.
cat /etc/dnsmanager/dnsmanager.conf | grep DB_USER | awk '{print $2}= '
Unzip database backup from /root.
gzip -d dnsmanagermysql.daily.dump.0.gz
Change user in the dump.
sed -i 's/OLD_DB_USER/NEW_DB_USER/g' dnsmanagermysql.daily.dump.0
Replace OLD_DB_USER with DB_USER value from the old server and NEW_DB_US= ER with DB_USER value from the new server.
Log in to MySQL using the following command:
mysql -u`cat /etc/dnsmanager/dnsmanager.conf |grep DB_USER | awk '{pri= nt $2}'` -p`cat /etc/dnsmanager/dnsmanager.conf | grep DB_PASSWD | awk '{p= rint $2}'`
Then execute this:
DROP DA= TABASE dnsmanager; CREATE DATABASE dnsmanager; quit
Load the old database.
mysql --force -u`cat /etc/dnsmanager/dnsmanager.conf |grep DB_USER | a= wk '{print $2}'` -p`cat /etc/dnsmanager/dnsmanager.conf | grep DB_PASSWD |= awk '{print $2}'` --default-character-set=3Dutf8 dnsmanager < dnsmanag= ermysql.daily.dump.0
In case you migrate form an old version, you need to run mysql_upgra= de utility.
mysql_upgrade -u`cat /etc/dnsmanager/dnsmanager.conf |grep DB_USER | a= wk '{print $2}'` -p`cat /etc/dnsmanager/dnsmanager.conf | grep DB_PASSWD | = awk '{print $2}'` --force
Force install dnsmanager-core.
yum -c /etc/dnsmanager-yum.conf reinstall dnsmanager-core
Restore zone files from the database:
/usr/local/dnsmanager/admin/sbin/zonemng -r
Restart dnsmanager, named= , zonemngd and updateurld and that should be it.