MySQL for the BT_Backup and other stuff?

Discuss suggestions and ideas for the forums, site, software.
Post Reply
ticedoff8
Member
Member
Posts: 21
Joined: Sat Jul 20, 2024 1:16 am

MySQL for the BT_Backup and other stuff?

Post by ticedoff8 »

I assume this has come up before, but I cannot find it in a <Search>
Is there a roadmap where qBitTorrent uses MySQL (MariaDB) for things like:
*BT_Backup
*GeoDB
*GeoIP
*Copy .torrent files to:
*Copy .torrent files for finished downloads to:
??

I could think of a few reasons this might be a good idea (speed, reliability, resilience, cross-OS portability, etc).

I'm finishing a digiKam setup to use my remote MySQL (MariaDB) server for its 3 main databases: core, faces and similarities. There are multiple digiKam clients (Linux, Mac and Windows) using them, and the MySQL databases are replicated between a master / slave MariaDB backend.
It worked out pretty good and it was easy to setup.
User avatar
Peter
Administrator
Administrator
Posts: 3039
Joined: Wed Jul 07, 2010 6:14 pm

Re: MySQL for the BT_Backup and other stuff?

Post by Peter »

qBittorrent has SQLite, but you have to enable it in Settings.
Advanced -> Resume data storage type -> SQLite

It's been present for quite some time now.
(From what I heard and seen, it really helps with large amount of torrents. I was able to operate 100k+ in a single client with it.)
ticedoff8
Member
Member
Posts: 21
Joined: Sat Jul 20, 2024 1:16 am

Re: MySQL for the BT_Backup and other stuff?

Post by ticedoff8 »

Correct me if I'm wrong, but SQLite is local and in the event of a disk failure, that data is lost.
I would also assume that migration from one host to another would be... complicated.

This question came to me when I tried to move my Windows qBt to a docker host with a docker version of qBittorrent.
I spent days and weeks trying to get it working and finally gave up because my 1000+ torrents could never be brought back online with the docker image.
I thought that maybe offloading all the local data / databases to a dedicated MySQL server might have helped that effort.

I've already got MariaDB online for digiKam, and it is running in a master / slave configuration for redundancy.
Maybe this could be a Feature Request.
User avatar
Peter
Administrator
Administrator
Posts: 3039
Joined: Wed Jul 07, 2010 6:14 pm

Re: MySQL for the BT_Backup and other stuff?

Post by Peter »

Yeahhh but qBittorrent is "local". Because it relies on local storage, it really makes no sense to store some settings and download state in a db. SQLite was added to make it perform better at high torrent count.

Anyhow, try and experiment. Fork the project and try if you can make a useful (for everyone) mysql fork. I might just not see it yet and maybe its really useful.
ticedoff8
Member
Member
Posts: 21
Joined: Sat Jul 20, 2024 1:16 am

Re: MySQL for the BT_Backup and other stuff?

Post by ticedoff8 »

I'm not suggesting qBt could be a multiuser system (if that's what you thought) by having the option to use a remote MySQL database. I'm suggesting it might be more resilient and portable if it did (possibly faster).
Some people may not see the value, and that's fair.

I'm a systems guy, and not a DB admin or programmer. It was hard enough to figure out how to use the ODBC Connector in Excel to pull data from a MySQL db.
MartynK
Newbie
Newbie
Posts: 5
Joined: Wed Feb 14, 2024 5:59 am

Re: MySQL for the BT_Backup and other stuff?

Post by MartynK »

Peter wrote: Wed Apr 23, 2025 8:08 am qBittorrent has SQLite, but you have to enable it in Settings.
Advanced -> Resume data storage type -> SQLite

It's been present for quite some time now.
(From what I heard and seen, it really helps with large amount of torrents. I was able to operate 100k+ in a single client with it.)
If you switch this option to SQLite, does it migrate things immediately, is it on restart or only for new ?
I have around 77k torrents seeing and I don't want to crash the setup a recheck would kill my system.
But if its going to be a big advantage speed wise it may well be worth it.
Post Reply