Furor Teutonicus https://www.furorteutonicus.eu/2021/03/21/shared-qbittorrent-data-on-a-dual-boot-pc/ Export date: Wed Apr 14 5:11:12 2021 / +0000 GMT |
Shared qBittorrent data on a dual-boot PCOne of my computers has both Linux and Windows installed. I often switch between operating systems, but I want to use the same torrents. Normally I would use a server or NAS in such a scenario, but this time I didn't have such a solution. This blogpost is meant for advanced computer users who want to accomplish the same. Note that you have to change directory pathnames to suit your own configuration. You can also download the scripts: qBittorrent_dualboot.zip 1 Set a shared filesystemFirst, you need storage that is accessible by both Linux and Windows. I choose a spare SSD, formatted with the exfat filesystem. In Windows, it's mounted as S: , and in Linux, as /mnt/scratch .Default Save PathSecond, you need to set the right download “Default Save Path” in qBittorrent, both in Linux and in Windows. ![]() Fastresume and Torrent file locationThe torrent files and their state, fastresume files, are stored in these locations 2:
You also need to store the files in BT_backup in the same location, accessible by both Linux and Windows. I've symlinked the BT_backup folders to a new folder on my “scratch” disk:
And then in Windows:
Convert savepaths between Linux and WindowsThe savepaths are stored in fastresume files. Alas, the savepaths are incompatible between Linux and Windows. The same base location for downloaded files is written differently:
The torrent and fastresume files are encoded as bencoded 3 files. This means you cannot just use sed because strings are precedes with a number indicating their length.To convert bencoded files to something you can edit from a shellscript easily, you can use bencode-pretty 4. Download, run make , and copy the binaries to /usr/local/bin/ .I've make a quick-and-dirty shellscript to convert the Windows savepaths to POSIX savepaths and back again. Note that if you use different paths, then you need to edit the script. /usr/local/bin/qbittorrent_fastresume_savepaths_convert.sh
Make it happen automaticallyNow I don't want to have to run this manually. I want this:
Then you can boot into Windows and the fastresume files are ready, or you can boot back in Linux and the savepaths will be converted to POSIX style. Just use this systemd unit file:
I've saved it as: /etc/systemd/system/qbittorrent_fastresume_savepaths_convert.service Enable and start using:
You're set!If all goes well, you will see downloads resuming after booting into another operating system. Note, however, that I didn't include support to categorize torrents or use subfolders or download locations other than the default. Happy leeching :-) |
Excerpt: Using the same torrents in qBittorrent while dualbooting between Linux and Windows. For advanced computer users. Shellscript and a systemd unit file are included. |
Links:
|
Post date: 2021-03-21 10:55:58 Post date GMT: 2021-03-21 09:55:58 Post modified date: 2021-03-21 11:01:00 Post modified date GMT: 2021-03-21 10:01:00 |
Export date: Wed Apr 14 5:11:12 2021 / +0000 GMT This page was exported from Furor Teutonicus [ https://www.furorteutonicus.eu ] Export of Post and Page has been powered by [ Universal Post Manager ] plugin from www.ProfProjects.com |