Backend Database

Has any thought been given to using something other than SQLite as the backend database? I understand that using SQLite makes things easier for the end-user to install, but I’d appreciate having PostgreSQL (preferred) or MySQL as a option.

Its come up before, but its not something we’re considering at this time. It add complexity that we don’t want to take on for the limited number of users that would use it.

Out of curiosity, what benefits do you see/would you get in using another database backend?

Looking mainly for performance. I realize that I’m not your usual user - I’m an experienced Linux sysadmin so I’m used to using “enterprise” tools to get things done.

I would also like to use mysql. For some reason the Sonarr db on my mac mini keeps getting corrupted. It could be because I have a really large DB, not sure why.

@SlackMaster You should try to find out when the corruption occurs. Is it a OS crash? Power outage? or when Sonarr crashes?
Also, is your version v2.0.0.3154 or high? Ever since that version we enabled the sqlite fullfsync on OSX. (tnx to OSX ignoring fsync, which is intended to ensure stuff is written to disk)
Corruption could have a variety of causes, most of em are external.

In any case, we will not be considering alternative database engines at this point.

@Taloth thanks for the response. It’s hard to say for sure when it happens. I usually don’t notice unless I see it’s been a day or two since new content was downloaded. We did have a storm come through and knock out power long enough to exhaust my battery backup.

In any case, I know the cause is external. The other database options would be a nice to have, but I totally understand the decision to not add complexity.

Is it possible to change the frequency of database backups? I’m not all that great with command line, is there a command I can setup as a script to backup the DB file every “X” hours?

Better backup control is something we have in the backlog:

Most UPS devices have a method of notifying the computer to shutdown/suspend prior to battery exhaustion.
You might want to look into that.

The problem with corruption after a power outage on OSX is surprisingly common, versus no or few reports on other operating systems.
I’m still thinking about how to deal with this more reliably, such as creating a backup prior to a sqlite wal checkpoint, but it won’t be easy to test, and I’m kinda frustrated that we cannot depend on a operating system to do it’s job.