SQLite Error 11 - database disk image is malformed

I recently converted from WINDOWS to MAC and everything seemed to be working correctly. My RM file was stored in the documents folder on my MAC. Until today, I was basically making sure the software worked - not adding information.

Today, I was working with one individual, editing sentences, sources, notes and printing reports. Then I got the SQLite error (database is malformed).

I closed the program and re-opened it. I tried restoring a backup from May 4th and got the same error. It did not appear that the restoration was working. I closed RootsMagic.

I also tried restoring the file and saving it on the desktop and in the RootsMagic folder.

I can’t get past the error.

Suggestions???

NOTE: I still have my Windows laptop so I can create another file from it – but I’m not sure why the SQL error is happening.

I believe there is a slightly different Collation Sequence used on MAC.

In this realm of converting over… I’d run the Database Tools (Rebuild indexes, Clean phantom records, Compact and Test integrity, on the Windows version …before whatever means of file format conversion

Then re-run Rebuild indexes and Test integrity on the MAC side.

1 Like

do what Kevin (@kbens0n ) suggested – I believe this “issue” is expected because of the different indexing used between Mac & windows. If running the tools before and after moving file between does not fix ( I believe it will ) then it possible something else is going on.

Kevin

The folder I was storing my RM data in was in my documents folder. I have Microsoft Office installed and thus OneDrive is installed. It has been 10 years since I’ve worked on a MAC but I think the documents folder is being uploaded to the cloud via OneDrive. Thus, I’m assuming that might be the issue.

I created a new folder for my RM file outside of documents, downloads, desktop and dropbox. I copied the file into this new folder. I also moved the backups out of dropbox into a new folder. I was able to open the file and run the tools. I was able to modify the one person I had been working with earlier. So far, it seems to be working and the tools are not reporting any error.

I will try again in the morning. If the SQL error reappears, I will go back to the Windows machine, run the tools, copy the file over and run the tools.

How does Time Machine impact RootsMagic? It is currently configured to backup every hour.

The best answer is that it doesn’t, but if you ever need to restore an RM database using Time Machine, better to restore from an RM backup file rather than just use an rmtree file.

A slightly longer but simplistic explanation is that Time Machine backups use the snapshot capability built into the MacOS APFS - Apple File System. To do a snapshot, APFS essentially freezes the system whilst it takes a copy of the whole file system at that instant of time. (Well, not the whole data, just the metadata for the whole data, which happens very quickly.) Then Time Machine backs up any data blocks added since the previous snapshot - no data blocks are modified in place, just the metadata changed if a block is no longer used. This backup phase does take significant time, but none of the disk data blocks to be copied will be modified or deleted until that snapshot is deleted when the next Time Machine backup is taken. If the underlying SQLite database that RM uses is in the middle of an update that involves writing multiple blocks to disk, I guess there is a chance an update may only be partially complete. Unlikely but possible.

1 Like

I have A Windows 11 (25H2) computer and also a Mac Mini with Tahoe 26.3.1
My Roots Magic Database is on an external hard drive plugged into the Windows computer and I have shared that drive as a network drive so that it can be seen by the MAC.
So long as you only open ONE copy of Roots Magic I have no issues looking at the database, you cannot access the database from both computers at the same time, If you have it open on the Windows computer and want to open it on the MAC you must close it on the windows computer first (and vice versa)

1 Like

Thanks – I wasn’t wanting to restore from Time Machine but concerned that it would impact RootsMagic in the same way that cloud storage does. From your response, I’m guessing that Time Machine did not cause my issue.

Thanks! I will have to investigate that. I do not think I will be wanting to access it on my Windows computer – but a network drive would get away from the cloud storage issues!