PDA

View Full Version : How to migrate/transfer qBittorrent configuration from WIndows to Linux



Fli
01-06-2019, 03:31 PM
qBittorrent apparently not yet made the migration to Linux possible in an user friendly way: https://github.com/qbittorrent/qBittorrent/issues/9912
If you do not want to run Windows qBittorrent via Linux Wine app but instead want to use Linux qBittorrent on Linux, check THIS (https://github.com/rumanzo/qbtchangetracker/issues/9). <<<<<<

But if you insist on running Windows .exe on Linux, then below in this post is mentioned full solution to run Windows qBittorrent on Linux with windows configuration. Problem of the tutorial below is:
- this is not migration to linux, this is just running windows qbittorrent on Linux thanks to Wine application (so that quite sucks when you can not use native linux app)
- it is boring and uneasy to follow this tutorial
- i have not yet tried to do the Windows qbt update, i guess i would have to manually replace files

-----------------------------
SHORT TUTORIAL, recommended
Install q4wine on debian, ubuntu..: sudo apt-get install q4wine
Install q4wine on fedora, centos..: yum install q4wine
(it should install wine, if not, do same command only for "wine")

Download qbittorrent installer for Windows: https://www.fosshub.com/qBittorrent.html
Double click on installer to run it. Proceed and complete installer (it should be run thru Wine).

Copy your Windows qbt configuration files to appropriate directories (following two lines each consist of two paths, first one is source path to your windows drive/partition and second one is path used by Wine):
1. /media/YOU/YOURHDDMOUNTPOINTNAME/Users/YOURUSERNAME/AppData/Roaming/qBittorrent/ -> /home/YOURUSERNAME/.wine/drive_c/users/YOURUSERNAME/Application Data/qBittorrent/
2. /media/YOU/YOURHDDMOUNTPOINTNAME/Users/YOURUSERNAME/AppData/Local/qBittorrent/ -> /home/YOURUSERNAME/.wine/drive_c/users/YOURUSERNAME/Local Settings/Application Data/qBittorrent/

(if .wine/ directory or /qbittorrent directory does not exist, you may try to create it)

In q4wine / Programs, right click to add New icon, select C:\Program Files\qBittorrent\qbittorrent.exe
Now you can launch qbittorrent from there or from desktop or from Linux menu.
It will be launched thru Wine and should adopt your settings from WIndows which you copied to appropriate directories as mentioned above.

-----------------------------
LONG TUTORIAL

1. Install wine and winetricks linux packages (see Wine installation manual on the official web page)


2. Run winetricks GUI, go to "Setup" tab, "Update fake drive" and here are paths (aliases) that wine will use. Make sure your windows paths match linux drive paths and you have not forgotten any HDD that qbt will be looking for.


3. find your windows qbittorrent installation folder (C:\Program FIles\qBittorrent possibly) and run qbittorrent.exe (using wine, icon doubleclick should launch it)


4. i changed some setting, added test torrent, but this may not be necessary. Then quit th qbittorrent, make sure it was not trayed, but fully exitted.


5. find following paths and backup its contents, qbuttorrent should create default empty profile in them:


Linux Wine qBittorrent configuration folder:
/home/YOURUSERNAME/.wine/drive_c/users/YOURUSERNAME/Application Data/qBittorrent/



Linux Wine qBittorrent fast resume & torrents folder:
/home/YOURUSERNAME/.wine/drive_c/users/YOURUSERNAME/Local Settings/Application Data/qBittorrent/


If such paths not exist (after replacing YOURUSERNAME in them), you need to find real paths, then copy your windows configs to wine configs folders. In my case:


/media/YOURUSERNAME/YOURHDDMOUNTPOINTNAME/Users/YOURUSERNAME/AppData/Roaming/qBittorrent/ -> /home/YOURUSERNAME/.wine/drive_c/users/YOURUSERNAME/Application Data/qBittorrent/

/media/YOURHDDMOUNTPOINTNAME/sda1/Users/YOURUSERNAME/AppData/Local/qBittorrent/ -> /home/YOURUSERNAME/.wine/drive_c/users/YOURUSERNAME/Local Settings/Application Data/qBittorrent/

(/media/YOURUSERNAME/YOURHDDMOUNTPOINTNAME is the mountpoint of the Windows system HDD on which i have qbt appdata folder which contains qbt configuration)


6. Disconnect internet in case something go wrong so you do not download into already downloaded files


7. Launch qbt again, via winetricks (or by clicking its .exe)


8. At this point i found qbt is using my WIndows configuration and torrents was resumed OK!! and i was able to recheck them and it always succeeded.


SIDENOTES: What if some torrents shows as Missing data because you failed to properly set fake paths for some drive in step 2?


My secondary drive located torrents shown as Missing data. So i had to quit qbt again and tweak my HDD fake path in winetricks app as described in step 2.
Note that if you need to use modified path on Linux (i mean you example moved your movies directory to other folder on same drive) on Linux, you can create directory symbolic link like this:
sudo ln -s "/media/veracrypt3/DiskXbackup/Directory" "/home/YOURUSERNAME/.wine/drive_c/"

Cause? if qbt save path for some torrents is C:\Directory but i do not have /media/YOURUSERNAME/sdx1/Directory but instead /media/veracrypt3/DiskXbackup/Directory, the symlink will be created to point from original (qbt expected) location /home/YOURUSERNAME/.wine/drive_c/ to new location /media/veracrypt3/DiskXbackup/Directory.

After modifying path or creating symbolic link to custom path, start qbt or restart again and qbt should begin rechecking torrents that was in Missing files/data state.

----

Feedback on this tutorial is welcome.

dinah01
07-18-2022, 04:57 PM
That helps a lot! cheers.