How To Repair Ldap Database Zimbra
ZCS 8.8
Contents
- i Scenario I - Single Server
- 1.1 Reinstall the Operating Organisation
- one.2 Reinstall ZCS-88 with Next Generation Modules
- 1.2.one During the ZCS-88 Software Reinstall
- 1.3 Scenario I - Summary
- 2 Scenario Ii - Mysql Server with corrupted mysql data that is beyond repair
- 2.ane Stop Zimbra Services
- 2.2 Move aside your one-time mysql directory
- 2.iii Start upward mysql in a clean land
- 2.4 Kickoff up the residual of the ZCS services
- 2.5 Run the external restore command to rebuild the mysql information
- 2.6 Scenario II: Summary
- 3 Scenario III - Multi Server: Restore LDAP Service
- 3.ane Method A
- 3.1.one Cease ldap and move the quondam database aside
- 3.1.2 Copy the backed upwardly ldap data from Server ii
- three.1.3 Excerpt the ldap.ldif file AND ldap-config file
- 3.one.iv Restore the ldap-config
- 3.1.5 Use zmslapadd to add the ldap information
- 3.2 Method B
- 3.2.1 Use zmrestoreldap
- 3.3 If ldap is not starting, use the long command to starting time ldap
- 3.4 Section III: Summary
- 3.ane Method A
Scenario I - Unmarried Server
You take been running ZCS-88 using the Next Generation Suite, and you lot have a dedicated disk for /opt/zimbra/, something like...
/dev/mapper/vg_zcs-lv_root xxG xxxG xxG xx% / tmpfs /dev/shm /dev/sda1 /boot /dev/sda2 /opt/zimbra/
But something has happened to the server node, effecting the operating system, which will require a reinstall of the operating organization, and ZCS-88.
Reinstall the Operating Arrangement
When you reinstall the operating system, brand sure the deejay containing /opt/zimbra/ is non mounted yet.
Reinstall ZCS-88 with Side by side Generation Modules
When you are gear up to reinstall ZCS-88, brand sure the /opt/zimbra/ is now mounted.
If it's possible, rename your production /opt/zimbra/ directory.
mv /opt/zimbra/ mv /opt/zimbraSAVE/
Now, run the installer as the root user using the software option.
./install.sh -south *OR* ./install.sh --software
During the ZCS-88 Software Reinstall
Detect at the finish of the software install, you will come across the following
Running Mail Installation Configuration: Software Installation complete! Operations logged to /tmp/install.log.SviTipi8
Now observe, you take two zimbra directories
drwxr-xr-10 30 root root 4096 Aug 24 14:29 zimbra drwxr-xr-10 30 root root 4096 Aug 17 13:20 zimbraSAVE
Since the software install had created the /opt/zimbra/ directory, lets movement it out of the style
mv /opt/zimbra/ /opt/zimbraSOFTWARE_INSTALL/
Now, lets put our production directory back into place
mv /opt/zimbraSAVE/ /opt/zimbra/
After putting your production /opt/zimbra/ directory back into identify, switch to the zimbra account, and outset Zimbra
su - zimbra zmcontrol start Host test3.zextras.local Starting ldap...Done. Starting zmconfigd...Washed. Starting logger...Done. Starting convertd...Done. Starting mailbox...Done. Starting memcached...Washed. Starting proxy...Done. Starting amavis...Washed. Starting antispam...Done. Starting antivirus...Done. Starting opendkim...Washed. Starting snmp...Washed. Starting spell...Done. Starting mta...Done. Starting stats...Done. Starting service webapp...Done. Starting zimbra webapp...Done. Starting zimbraAdmin webapp...Done. Starting zimlet webapp...Done. Starting imapd...Done.
Check the status
zmcontrol status Host test3.zextras.local amavis Running antispam Running antivirus Running convertd Running imapd Running ldap Running logger Running mailbox Running memcached Running mta Running opendkim Running proxy Running service webapp Running snmp Running spell Running stats Running zimbra webapp Running zimbraAdmin webapp Running zimlet webapp Running zmconfigd Running
Scenario I - Summary
Operating system needed to be installed, moving aside product Zimbra, and doing a software install, and placing production Zimbra directory back into place.
At this point, you should be upwards and running; all the same, as an pick, you may want to bank check the user BLOBs, you tin refer to this guide.
Scenario II - Mysql Server with corrupted mysql data that is across repair
You accept been running ZCS-88 using the Adjacent Generation Suite, and you accept just discovered a lot of errors in the /opt/zimbra/mysql_error.log file, and the mysql service is not running
You even tried to export and reimport the mysql data to no avail.
Stop Zimbra Services
zmcontrol stop
Move bated your old mysql directory
mv /opt/zimbra/db/data/ /opt/zimbra/db/OLD_data/ mkdir /opt/zimbra/db/data/
First upward mysql in a clean state
/opt/zimbra/zmmyinit
Start upwards the rest of the ZCS services
zmcontrol showtime zmcontrol status
Recall!
The mailboxd service must exist running in gild to use the zxsuite command.
Run the external restore command to rebuild the mysql data
zxsuite backup doExternalRestore /opt/zimbra/backup/
Scenario Ii: Summary
If mysql service is not running because of corruption, simply move aside the data directory, and run the zmmyinit script to bring up mysql service into a new clean state. Followed up by running the doExternalRestore option.
Scenario III - Multi Server: Restore LDAP Service
Ii Node Setup
Server i - LDAP + Proxy + MTA
Server 2 - Mailboxd (User post store)
If LDAP services are needed to be restored, you can exercise the post-obit.
Method A
Stop ldap and motility the quondam database aside
ldap stop mv /opt/zimbra/data/ldap/mdb/db /opt/zimbra/information/ldap/mdb/OLD_db/ mkdir -p /opt/zimbra/data/ldap/mdb/db
Copy the backed upwardly ldap data from Server two
mkdir /tmp/ldap/ scp root@server2.example.com:/opt/zimbra/fill-in/ldap/ldap_23_08_17#04_01_00.tar.gz /tmp/ldap/ chown -R zimbra:zimbra /tmp/ldap/
Extract the ldap.ldif file AND ldap-config file
tar -zxvf ldap_23_08_17#04_01_00.tar.gz ldap.ldif tar -zxvf ldap_23_08_17#04_01_00.tar.gz ldap-config.ldif
Restore the ldap-config
cd /tmp/ldap/ mv /opt/zimbra/data/ldap/config/ /opt/zimbra/data/ldap/OLDconfig/ mkdir /opt/zimbra/data/ldap/config/ /opt/zimbra/libexec/zmslapadd -c /tmp/ldap/ldap-config.ldif
Use zmslapadd to add the ldap data
/opt/zimbra/libexec/zmslapadd /tmp/ldap/ldap.ldif ldap first
Method B
Use zmrestoreldap
List all labels
zmrestoreldap -lbs **Should see something similar...** total-20170824.050005.077 total-20170823.050004.754 full-20170822.050004.779 full-20170821.050004.736 full-20170820.050005.331
Then use zmrestoreldap with the characterization name to restore the ldap data.
zmrestoreldap -lb full-20170824.050005.077
If ldap is not starting, use the long command to start ldap
sudo /opt/zimbra/libexec/zmslapd -fifty LOCAL0 -u zimbra -h 'ldap://ldap.case.com:389 ldapi:///' -F /opt/zimbra/data/ldap/config -d -4
The bottom portion of the output will ordinarily provide a clue on why ldap is non starting.
Section Three: Summary
Method A is to illustrate you can re-create the backed upwardly ldap from some other node with Next Generation Module installed, excerpt the ldap data, and manually add ldap dorsum into the ldap service.
Method B is to illustrate the old standard way of restoring ldap service using the zmrestoreldap command.
Recall!
Next Generation modules are only installed on Zimbra nodes running mailboxd service; and past convention, nodes running mailboxd will need to remove zmbackup from cron.
All the same, in a multi node setup, Next Generation modules would not be installed on a node running ldap service. Therefore, the zmbackup command can nevertheless exist in identify in cron to save the ldap config.
Source: https://wiki.zimbra.com/wiki/ZCS88-zxbackup-Disaster-Recovery
Posted by: rosenfeldexped1961.blogspot.com
0 Response to "How To Repair Ldap Database Zimbra"
Post a Comment