SQLite error 8 - attempt to write a readonly database

Cannot backup or close my file as I get this message. Only one file open. Was not using any diagnostic tools. Just returned to the database after a couple of hours open.

Thoughts? Actions?

Assuming You have done nothing to the file permissions, this can occur if you:

  • open a database created from the process of making a Shareable Drive
  • issues arising from programs that backup or synch to the Cloud… like Carbonite, OneDrive and DropBox, ETC.
  • Antivirus other than Windows Defender

Force close RootsMagic (don’t worry about missing this backup or harming your file). Reboot computer. Reopen RM. Reopen file. Do you still get the error?

1 Like

Hi kbens0n,

None of the scenarios you describe apply. My database is basically isolated on my desktop from any internet interaction except for my off-site backups to the cloud, iDrive, which has never been a problem before.

Hi TomH,

What is interesting about your suggestion… I Force Quit RM9… when it reopened there is no sign of the file in “Recent Files”, when I reopen the program (a little disconcerting!).

When I go to my list of databases (the default folder when all my RM .rmtree files are are stored… I see it, but only about 24 hours ago. When I try the right click command Open With… (in Mac)… RootsMagic.app is not even offered as an option of opening. Seems like the only thing I might be able to open is my last backup, from 2 days ago, but I have done some work on the file since then.

If it’s not in Recent Files, I’m unsurprised if it was a new file in the session you force-closed because that would be registered on normal closing. I am surprised if you have been opening and closing your database file for days.

That you found the file you think you were working on today but it’s time-stamped over a day ago, I can only surmise that you were actually working on a different file because the timestamp updates with every saved edit.

Outliers to the above might be that your file is in a Dropbox or equivalently actively-synced folder or you were working on a version on removable media.

You have to open RM9 files from within RM - opening from the Finder does not work - and is not intended to work. (Don’t ask.)

Is is your RM database files with an *.rmtree extension that are backed up via iDrive or is it your RM backup files with an *.rmbackup extension that are backed up via iDrive? If it is your *.rmtree files that are backed up via iDrive, then that possibly is the problem. It means that your RM database is not isolated from any any Internet interaction. Rather, it likely means that your RM database is exposed to Internet interaction that in the worst case can be pretty extreme. If your iDrive backups are scheduled to be immediate or if they are in any way scheduled to take place while you are using RM, then you You have only been very lucky if you have not had any problems in the past.

Well, I need to clarify that I don’t have any experience with iDrive, but I have much experience with other cloud services that work pretty much the same as iDrive. So I can’t be 100% sure if iDrive can detect when your *.rmtree files are in use so that it does not back them up while you are using them. And I also don’t know what scheduling mode you are using with iDrive. If iDrive does manage not to backup your *.rmtree files while you are using them, then it may not be the problem. But iDrive’s competitors often do backup your *.rmtree files while you are using them. So it’s something to look into.

Hi thejerrybryan

iDive does incremental backups only every 24 hours at 2AM… I am too old to be up that late any more! It is backing up *.rmtree files and *.rmbackup files along with everything else. However I have an hourly backup on site to an external hard drive using Carbon Copy Cloner (CCC).

I have been working on this file daily for over 2 weeks. Only one file open at a time. Not always closed when I leave it for the day (maybe that was the hitch), but always backed up when I walk away for a while during the day. My last backup showing was February 10, 2024 at 18:10h, error encountered yesterday (the 12th) just before posting.

Not sure how I find out if iDrive is backing up files in programs that are open but I will certainly be sure RM9 is closed at the end of each and every day, before the iDrive backup. That leaves the CCC hourly back up in question moving forward. I can isolate RM9 from the hourly backup but that goes against the very reason for having an hourly backup.

Any other thoughts? Preventative measures? Should this be reported to RM officially somehow? It seems to be a potentially significant ‘loss of data’ issue.

An additional piece of information.

I have just found what is the last copy of the *rmtree file dated February 11, 2024 at 16:42. It is showing on my hourly backup drive, but not on my desktop - as TomH suggested - as that session was Force Quit.

Riddle solved - I now recall changing the folder name slightly, the folder where the backups, databases, media and GEDCOMS are stored. I did that in Finder (Mac)… and did not change the assigned folder names in RM. No wonder it was confused. Thank you for your guidance in sorting through the issue… as is common…“operator error”.

The iDrive procedure you have set up certainly seems safe.

The CCC procedure you have set up has a very high probability of being safe but not a certainty. To have a problem, you would have to be doing something in RM that would be updating the RM database at the very instant that CCC is doing its hourly backups and CCC would have to be ignoring the fact that the RM database is open. It seems unlikely that your problem has anything to do with CCC. It’s very hard to be sure, but I suspect your read only status has something to do with the force quit.

By the way, I did Google the iDrive options. It seems to have a lot more options than Dropbox and OneDrive about when to copy data from your hard disk to the cloud servers. It’s like iDrive can serve more like a daily backup if you wish, and it can also serve more like a continuous sync if you wish, depending on the options you set. I use both OneDrive and Dropbox. It’s a long story why both, but there is no overlap. My OneDrive folder is synced to the OneDrive cloud and my Dropbox folder is synced to the Dropbox cloud. All the syncs are continuous unless I pause them. I also use Carbonite which is more like a once a day backup than a sync.

My removable hard drive sync is not automatic and I do it manually once a month. I keep the hard drives offsite. This is my super horrible disaster backup. One problem with a hard drive backup or sync where the hard drive is always attached to your machine is that if you get a ransomware attack, all your hard drive backups will become infected very quickly. The same is true of any Internet based backups or sync. The only thing that protects your data from ransomware besides not getting infected in the first place is to have backups that have air between the backup media and your computer so that the backup media is not connected to your computer in any way.

CCC (and Time Machine) backups use a checkpointing feature built into the file system (ADFS) used by MacOS. This involves freezing program execution, taking a very quick copy of the total file system metadata and then resuming program execution. The file system never updates in place and deleted data is not freed up immediately. The copy of the file system metadata plus any changes to the data since the previous checkpoint are then written to the backup destination. CCC and Time Machine use different previous checkpoints to decide on what data needs to be included in their checkpoints, but the process is very robust.