Plugin:Dbx mdbx: Difference between revisions

From Miranda NG
Plugin:Dbx mdbx
Jump to navigation Jump to search
(Marked this version for translation)
(Marked this version for translation)
 
(12 intermediate revisions by the same user not shown)
Line 3: Line 3:
{{TNT|Warning|<translate> <!--T:11--> This database driver might suffer problems because of PC instability or disk damages. Thus that's vitally important to {{Plugin|PluginUpdater|make backups}} once a day to minimize the chance of data loss.</translate>}}
{{TNT|Warning|<translate> <!--T:11--> This database driver might suffer problems because of PC instability or disk damages. Thus that's vitally important to {{Plugin|PluginUpdater|make backups}} once a day to minimize the chance of data loss.</translate>}}


{{TNT|Warning|<translate><!--T:7--> Plugin [<tvar|issue_link>https://github.com/miranda-ng/miranda-ng/issues/1209</> does not work under Wine].</translate>}}
{{TNT|Warning|<translate><!--T:27--> This database driver does not work correctly under Wine due to the lack of some necessary functions in the Wine itself. Use {{Plugin|Dbx_sqlite}} database driver.</translate>}}


<translate>
<translate>
Line 12: Line 12:
Based on <tvar|project_website>'''[https://github.com/leo-yuriev/libmdbx libmdbx]'''</> library, but contains some changes from the Miranda NG team which are necessary to meet the specific needs of Miranda.
Based on <tvar|project_website>'''[https://github.com/leo-yuriev/libmdbx libmdbx]'''</> library, but contains some changes from the Miranda NG team which are necessary to meet the specific needs of Miranda.


== Database check == <!--T:25-->
</translate>
<pre style="overflow:auto;">
Miranda32.exe /svc:dbchecker
</pre>
<translate>
<!--T:26-->
or
</translate>
<pre style="overflow:auto;">
Miranda64.exe /svc:dbchecker
</pre>
<translate>
== Database repair == <!--T:12-->
== Database repair == <!--T:12-->
</translate>
</translate>
Line 22: Line 37:


<pre style="overflow:auto;">
<pre style="overflow:auto;">
mdbx_chk.exe -i -w -v -t -2 "path\to\corrupted.dat"
mdbx_chk.exe -i -w -v -t -1 "path\to\corrupted.dat"
</pre>
</pre>


<translate>
<translate>
<!--T:19-->
<!--T:19-->
This command will select the second to last meta page (since the last one is probably corrupted).
This command will select the second to last meta page (since the last one is probably pointing to corrupted snapshot).


<!--T:20-->
<!--T:20-->
Each meta page contains the necessary information (number transactions, geometry, etc.) as well as a pointer (usually) to
Each meta page contains the necessary information (number transactions, geometry, etc.) as well as a pointer (usually) to
own MVCC snapshot that seems to float in many pages along with the rest of the MVCC snapshots. Each such snapshot is generated when the writing transaction is committed.
own MVCC snapshot that seems to "float" in many pages along with the rest of the MVCC snapshots. Each such snapshot is generated when the writing transaction is committed.


== Database check == <!--T:8-->
<!--T:9-->
mdbx_chk.exe is located in the Miranda root folder.
</translate>
<pre style="overflow:auto;">
mdbx_chk.exe -i -v -n -w "path\to\database.dat"
</pre>
{{TNT|Note|<translate><!--T:10--> "problems: wrong order of entries" messages should not be considered as errors.</translate>}}
<translate>
== If the above does not help == <!--T:14-->
== If the above does not help == <!--T:14-->



Latest revision as of 18:10, 10 February 2021

Other languages:
Miranda NG MDBX database driver

Filename Dbx_mdbx.dll
Author Miranda NG team
Download links
Stable version: 32-bit, 64-bit
Development version: 32-bit, 64-bit

Warning
This database driver might suffer problems because of PC instability or disk damages. Thus that's vitally important to make backups once a day to minimize the chance of data loss.
Warning
This database driver does not work correctly under Wine due to the lack of some necessary functions in the Wine itself. Use Dbx_sqlite database driver.

Provides Miranda database support: global settings, contacts, history, settings per contact.

Based on libmdbx library, but contains some changes from the Miranda NG team which are necessary to meet the specific needs of Miranda.

Database check

Miranda32.exe /svc:dbchecker

or

Miranda64.exe /svc:dbchecker

Database repair

Important
Make a backup copy of the damaged database before restoring!

mdbx_chk.exe is located in the Miranda root folder.

mdbx_chk.exe -i -w -v -t -1 "path\to\corrupted.dat"

This command will select the second to last meta page (since the last one is probably pointing to corrupted snapshot).

Each meta page contains the necessary information (number transactions, geometry, etc.) as well as a pointer (usually) to own MVCC snapshot that seems to "float" in many pages along with the rest of the MVCC snapshots. Each such snapshot is generated when the writing transaction is committed.

If the above does not help

mdbx_dump.exe and mdbx_load.exe are located in the Miranda root folder.

mdbx_dump.exe -n -a -f "%TEMP%\corrupted.tmp" "path\to\corrupted.dat"
mdbx_load.exe -n -a -f "%TEMP%\corrupted.tmp" "path\to\repaired.dat"

This extracts as much data as possible from the corrupted.dat to the temporary file and builds repaired.dat.