Author Topic: Database migration  (Read 31695 times)

0 Members and 2 Guests are viewing this topic.

Offline riki

Re: Database migration
« Reply #15 on: 28 03 2018, 16:59:49 »
Luckily I have no problems with contact list etc., but I'm refraining from updates at the moment, since I am always offered Dbx_mdbx.dll and I'm afraid I will have the "uncompatible database" error (it happened once, then restarting resolved it).

There is still a thing. It may be important or not. I am reporting it for the developers.

My database .dat file modification date is still 26 March. Messaging works OK, but the date does not get updated when I send or receive messages. Even closing and reopening Miranda does not change that date. Strange.

P.S. After Ghazan's suggestion, I always check I only have at most 1 Miranda process active in Task Manager, and I killed all leftover Miranda processes after exiting.
 

Offline dartraiden

Re: Database migration
« Reply #16 on: 28 03 2018, 20:09:04 »
>  I always check I only have at most 1 Miranda process active

Not need anymore, we fixed this. Just update to last version and you cannot launch second Miranda with same profile.

Dbx_mdbx got some fixes (and will surely get many more), so it is offered as an update.
 

Offline ghazan

Re: Database migration
« Reply #17 on: 28 03 2018, 20:20:21 »
amix,
you have old Libs/mir_app.mir, that wasn't updated. I recommend you either to download the archive of Miranda's core (cause you cannot launch the profile) from https://miranda-ng.org/distr/x32/miranda32.zip (or https://miranda-ng.org/distr/x64/miranda64.zip for 64-bit version) and install all libs from it, then retry to import your old profile saved as *.BAK: rename it to *.dat and launch Miranda again
 

Offline SpinalBlood

Re: Database migration
« Reply #18 on: 29 03 2018, 00:14:59 »
I tried it some days ago but I have two problems:

- if I try to create a brand new profile with the last nightly of miranda: I can't create any account, it wont show any plugins

- I tried to convert my profile. But when it tried to import the history (during the conversion), many errors appeared
(I don't have a screen right now, I tested it the other day... I should test this again...)

(Version info is only related to the first problem)


VersionInfo
Quote
CPU: Intel(R) Core(TM) i5-3450 CPU @ 3.10GHz [Intel64 Family 6 Model 58 Stepping 9] [DEP Enabled] [4 CPUs]
Installed RAM: 3792 MBytes
Microsoft Windows 7 Ultimate Edition, 64-bit Service Pack 1 (build 7601)
Internet Explorer: 9.11.9600.17801 (build 99600)
Administrator privileges: Yes
OS Languages: (UI | Locale (User/System)) : Italian/Italian | Italian/Italian
Free disk space on Miranda partition: 388163 MBytes

Miranda NG Version: 0.95.8 alpha build #19601 (e6e175b99a) [running inside WOW64]
Build time: 29 Mar 2018 1:00:48
Profile: D:\New\mir958\Profiles\test\test.dat (MDBX database driver)
Profile size: 262144 Bytes
Profile creation date: 29 Mar 2018 1:15:47
Language pack: No language pack installed
Service Mode: No

Active Plugins (13):
¤ AVS.dll v.0.95.3.4 [29 Mar 2018 1:00:52] - Avatar service
¤ Clist_modern.dll v.0.9.1.7 [29 Mar 2018 1:01:16] - Modern contact list
¤ CrashDumper.dll v.0.1.0.1 [29 Mar 2018 1:01:23] - Crash dumper
¤ DbEditorPP.dll v.4.0.1.2 [29 Mar 2018 2:01:22] - Database editor++
¤ Dbx_mdbx.dll v.0.95.8.6 [29 Mar 2018 1:02:11] - Miranda NG MDBX database driver
¤ Dbx_mmap.dll v.0.95.8.1 [29 Mar 2018 1:01:02] - Miranda NG mmap database driver
¤ Facebook.dll v.0.4.1.1 [29 Mar 2018 1:01:20] - Facebook
¤ historypp.dll v.1.5.1.5 [28 Mar 2018 19:15:08] - History++
¤ Import.dll v.0.95.8.5 [29 Mar 2018 1:01:07] - Import contacts and messages
¤ PluginUpdater.dll v.0.1.2.5 [29 Mar 2018 1:01:34] - Plugin updater
¤ Popup.dll v.2.1.1.12 [29 Mar 2018 2:01:06] - Popup plus
¤ TabSRMM.dll v.3.5.0.8 [29 Mar 2018 1:00:59] - TabSRMM
¤ TopToolBar.dll v.0.8.0.4 [29 Mar 2018 1:01:12] - TopToolBar

Protocols and Accounts:
-------------------------------------------------------------------------------
Facebook                 0 - Enabled 0 - Disabled  Loaded
GG                       0 - Enabled 0 - Disabled  Loaded
ICQ                      0 - Enabled 0 - Disabled  Loaded
IRC                      0 - Enabled 0 - Disabled  Loaded
JABBER                   0 - Enabled 0 - Disabled  Loaded
MSN                      0 - Enabled 0 - Disabled  Loaded
MetaContacts             1 - Enabled 0 - Disabled  Loaded

Icon Packs:
-------------------------------------------------------------------------------
 HistoryPP_icons.dll [29 Mar 2018 2:03:04]
 Proto_Facebook.dll [29 Mar 2018 1:03:00]
 Proto_GG.dll [29 Mar 2018 1:03:01]
 Proto_ICQ.dll [29 Mar 2018 1:03:00]
 Proto_IRC.dll [29 Mar 2018 1:03:00]
 Proto_Jabber.dll [29 Mar 2018 1:03:00]
 Proto_MetaContacts.dll [29 Mar 2018 1:03:02]
 Proto_MSN.dll [29 Mar 2018 1:03:01]
 TabSRMM_icons.dll [29 Mar 2018 1:03:02]
 Toolbar_icons.dll [29 Mar 2018 1:03:02]
 xStatus_ICQ.dll [29 Mar 2018 1:03:01]
 xStatus_Jabber.dll [29 Mar 2018 1:03:02]
[close]
 

Offline dartraiden

Re: Database migration
« Reply #19 on: 29 03 2018, 00:19:52 »
Confirmed, https://github.com/miranda-ng/miranda-ng/issues/1229

Please, test history import again, because we fixed a lot of bugs in last days.
 

Offline SpinalBlood

Re: Database migration
« Reply #20 on: 29 03 2018, 00:34:36 »
Ok I will soon

Should be noted that I can't grant the "new account" problem was present some days ago, because in this case I tested it just now
 

Offline amix

  • Newbie
  • *
  • Posts: 3
Re: Database migration
« Reply #21 on: 29 03 2018, 18:08:37 »
[...] then retry to import your old profile saved as *.BAK: rename it to *.dat and launch Miranda again

Thanks for help.

Not quite sure if I follow correctly:

After installation of all libs from Core (done), I go to my profiles folder. This is how it looks like:

Code: [Select]
AvatarCache
Avatars
Logs
MirOTR
tabSRMM
amix@DESKTOP.dat
amix@DESKTOP.dat.bak
amix@DESKTOP.dat-lck

I then did:

1. delete *.dat
2. rename *.bak to *.dat
3. start Miranda-NG and let it convert the profile

I just did that. I got a lot of dialogs with "Order Number xyz not found in (several plugins, like ICQ, IRC, Steam, Facebook, etc.)" After that, Miranda started, but no contacts were available in my contacts-list. Only the folders/groups I had. Now the profile is 512KB, before it was 18.816KB. Also, it seems, that none of the plugins I have got loaded.

When I start out with a new profile, I get the choice between:
dbx mmap and MDBX drivers. Which one shall I take? Also, if I select "Start in service mode with import.dll" I can not continue, just quit.

I then decided to delete all from Miranda NG folder and copy all from the archive you suggested into it. Sort of a fresh install. I also did delete the whole profile folder. But then, upon profile creation, chosing the MDBX driver, I got a dialog: Error 1. And a second dialog: No suitable database driver found.
This is what I have now (Windows pops up warning me, that the application would be unsigned/insecure, which it did not do before):
Code: [Select]
C:\Program Files\Miranda NG\
├── Core
│   ├── StdAutoAway.dll
│   ├── StdAway.dll
│   ├── StdClist.dll
│   ├── StdCrypt.dll
│   ├── StdEmail.dll
│   ├── StdFile.dll
│   ├── StdIdle.dll
│   ├── StdMsg.dll
│   ├── StdSSL.dll
│   ├── StdUIHist.dll
│   ├── StdUserInfo.dll
│   └── StdUserOnline.dll
├── Icons
│   └── Proto_MetaContacts.dll
├── Libs
│   ├── api-ms-win-core-console-l1-1-0.dll
│   ├── api-ms-win-core-datetime-l1-1-0.dll
│   ├── api-ms-win-core-debug-l1-1-0.dll
│   ├── api-ms-win-core-errorhandling-l1-1-0.dll
│   ├── api-ms-win-core-file-l1-1-0.dll
│   ├── api-ms-win-core-file-l1-2-0.dll
│   ├── api-ms-win-core-file-l2-1-0.dll
│   ├── api-ms-win-core-handle-l1-1-0.dll
│   ├── api-ms-win-core-heap-l1-1-0.dll
│   ├── api-ms-win-core-interlocked-l1-1-0.dll
│   ├── api-ms-win-core-libraryloader-l1-1-0.dll
│   ├── api-ms-win-core-localization-l1-2-0.dll
│   ├── api-ms-win-core-memory-l1-1-0.dll
│   ├── api-ms-win-core-namedpipe-l1-1-0.dll
│   ├── api-ms-win-core-processenvironment-l1-1-0.dll
│   ├── api-ms-win-core-processthreads-l1-1-0.dll
│   ├── api-ms-win-core-processthreads-l1-1-1.dll
│   ├── api-ms-win-core-profile-l1-1-0.dll
│   ├── api-ms-win-core-rtlsupport-l1-1-0.dll
│   ├── api-ms-win-core-string-l1-1-0.dll
│   ├── api-ms-win-core-synch-l1-1-0.dll
│   ├── api-ms-win-core-synch-l1-2-0.dll
│   ├── api-ms-win-core-sysinfo-l1-1-0.dll
│   ├── api-ms-win-core-timezone-l1-1-0.dll
│   ├── api-ms-win-core-util-l1-1-0.dll
│   ├── api-ms-win-crt-conio-l1-1-0.dll
│   ├── api-ms-win-crt-convert-l1-1-0.dll
│   ├── api-ms-win-crt-environment-l1-1-0.dll
│   ├── api-ms-win-crt-filesystem-l1-1-0.dll
│   ├── api-ms-win-crt-heap-l1-1-0.dll
│   ├── api-ms-win-crt-locale-l1-1-0.dll
│   ├── api-ms-win-crt-math-l1-1-0.dll
│   ├── api-ms-win-crt-multibyte-l1-1-0.dll
│   ├── api-ms-win-crt-private-l1-1-0.dll
│   ├── api-ms-win-crt-process-l1-1-0.dll
│   ├── api-ms-win-crt-runtime-l1-1-0.dll
│   ├── api-ms-win-crt-stdio-l1-1-0.dll
│   ├── api-ms-win-crt-string-l1-1-0.dll
│   ├── api-ms-win-crt-time-l1-1-0.dll
│   ├── api-ms-win-crt-utility-l1-1-0.dll
│   ├── FreeImage.mir
│   ├── libeay32.mir
│   ├── libjson.mir
│   ├── mir_app.mir
│   ├── mir_core.mir
│   ├── msvcp140.dll
│   ├── Pcre16.mir
│   ├── sqlite3.mir
│   ├── ssleay32.mir
│   ├── ucrtbase.dll
│   ├── vcruntime140.dll
│   └── Zlib.mir
├── Miranda64.exe
└── Plugins
    ├── Dbx_mdbx.dll
    ├── Dbx_mmap.dll
    └── Import.dll
 

Offline ghazan

Re: Database migration
« Reply #22 on: 30 03 2018, 13:09:32 »
amix,
I got a lot of dialogs with "Order Number xyz not found in (several plugins, like ICQ, IRC, Steam, Facebook, etc.)"
it means that you have different versions of plugins. what do you really need is to run Plugin Updater once on that new profile without accounts, replace all dlls with these proper versions and only then retry the import. evidently, if your protocol plugins aren't loaded, Miranda can't perform the import correctly

PS: if Plugin Updater itself fails to load, you need to download it manually from https://miranda-ng.org/p/PluginUpdater -> development version
 

Offline yvesson

Re: Database migration
« Reply #23 on: 30 03 2018, 16:49:37 »
all clist problems must have been fixed, new build is already uploaded

Hej,
Seems everything is working fine now, used the backup of my old profile and converted it, now it's like before.
So thanks !
 

Offline riki

Re: Database migration
« Reply #24 on: 31 03 2018, 22:36:48 »
After forcefully rebooting the computer, now Miranda doesn't start correctly. It gives me this error:

Code: [Select]
Miranda was unable to open 'profile.dat', it's in an unknown format.
I tried to relaunch Miranda with no profiles, but the import failed. So I tried updating (update worked OK), but even after updating I wasn't able to import the profile. Import says something like "database read problem".

DbChecker.bat gives me the same error,  "Miranda was unable to open..."

I am worrying. It's my historical profile, with data from over 10 years ago (taken over from the old Miranda-IM). Any suggestions?

(EDIT) A couple of questions for the developers.

- Is the new database format/driver more fragile? I don't remember having such a data disaster (apparent total loss of DB info) with power outages or forced reboots.

- Is a database repair tool scheduled? I used it quite often. Especially with facebook plugin, there were often issues with duplicated messages etc., and that tool solved all such problems for me.
« Last Edit: 01 04 2018, 00:39:49 by riki »
 

Offline ghazan

Re: Database migration
« Reply #25 on: 02 04 2018, 12:14:56 »
riki,

1. DbChecker.bat is totally obsoleted, as well the whole dbchecker plugin

2. Your previous profile was renamed to .bak and stored in the same profile.

3. You can always rename it back and retry the import
 
The following users thanked this post: AnrDaemon

Offline riki

Re: Database migration
« Reply #26 on: 02 04 2018, 20:20:08 »
Thanks for replying, Ghazan.

3. You can always rename it back and retry the import

I'd already tried that, but it seems import plugin doesn't like it. Error reading source file. I can open older backups that I made myself, with no issue (no need to import either - Miranda just starts OK).

Sorry, more questions. I hope you don't mind.

How can I know which db driver Miranda is using? Should I switch? How?

By the way, the dat-lck file doesn't get deleted, even after Miranda exits. Is this normal?
 

Offline dartraiden

Re: Database migration
« Reply #27 on: 02 04 2018, 21:36:13 »
Quote
How can I know which db driver Miranda is using?
If CrashDumper plugin is installed: Main menu -> Version information -> Show. You will see smth like this:
Quote
Miranda NG Version: 0.95.8 alpha build #19651 (8d3083580d) x64
Build time: 2 Apr 2018 19:56:00
Profile: C:\Users\dr\AppData\Roaming\Miranda NG\home\home.dat (MDBX database driver <- current profile's database driver)

If you still on MMAP (old format):
- exit Miranda
- make sure no Miranda copies are launched
- backup all Miranda folder
- backup profile (blabla.dat)
- start Miranda, update to the last version via plugin updater and Miranda ask about conversion.

If you already on MDBX and can see this in Version Info, so you already successfully converted profile and use it.

Quote
Is this normal?
Yes, if your profile is MDBX. If MMAP - delete lck manually.
 
The following users thanked this post: riki

Offline riki

Re: Database migration
« Reply #28 on: 03 04 2018, 12:46:14 »
Hello dartraiden, thank you! I checked as you suggested and I'm on MDBX. I think I have been for a long time, since my updater is set up for experimental versions.

I haven't been able to recover my latest profile.dat, however. Whatever happened, I am taking my safety measures, so I set up a daily rsync to back it up.

However, I found that profile.dat file is locked while Miranda is running, so rsync can't read it to back it up, and the backup fails. The only way I found to make it work is to exit Miranda before the automatic backup time. This is unconvenient, as Miranda is always running on my system.

I wonder: could a command be added to flush and unlock profile.dat? If so, I could schedule it inside of Miranda and the daily backup could proceed without errors. Or maybe some other way to make profile.dat accessible by external processes when needed?
 

Offline AnrDaemon

Re: Database migration
« Reply #29 on: 08 04 2018, 12:59:23 »
Many archiving programs, such as RAR, could open write-locked files.
But keep in mind that such method is prone to making an inconsistent backup.
Your best option is something like https://wiki.miranda-ng.org/index.php?title=Plugin:Db_autobackups
Haven't used it myself, no idea if it's working with current database driver.