moving torrents WITH their paths to a new drive

Windows specific questions, problems.
jdohe

moving torrents WITH their paths to a new drive

Post by jdohe »

I have a "small" 12 TB hard drive that I want to replace with a 20 TB hard drive.
The problem is... hundreds of my torrents have unique, long, pathnames.

How can a move the file:
d:\files\torrents\this-is-a-very-long-pathname\movie.mp4
to
g:\files\torrents\this-is-a-very-long-pathname\movie.mp4
without having to manually select the drive AND full pathname for each torrent?

There should be a way where I can tag multiple torrents.. and change their location from D: to G:
and Qbittorrent would automatically copy their paths WITH the torrent, so I didn't have to type it in.

ALSO... I have tried right-clicking on torrents on D: and the full path pops up... and I edit the path to begin with a G: instead of a D:
There is not reason that should not work.. but it doesn't! I have to manually select the drive, and each step of the pathname.

Lastly, if the path doesn't exist on G:, Qbittorrent should automatically create it - duplicating the path from the D: drive.
unseen19
Veteran
Veteran
Posts: 188
Joined: Mon Mar 15, 2021 1:36 pm

Re: moving torrents WITH their paths to a new drive

Post by unseen19 »

Hi,

With QBT directly nothing I know. But here is what I did in the past:

- pause all torrents in QBT
- stop QBT, be sure the process is no more running (task manager too)
- copy the d: drive to the g: drive including permission (robocopy /mir /sec for example or any similar tool)
- swap the drive letter (the old g: is now the new d:)
- open QBT, resume some files to be sure nothing is wrong or...do a force recheck on all torrents if you are on private tracker with ratio (too cautious but ratio is gold sometime)
jdohe

Re: moving torrents WITH their paths to a new drive

Post by jdohe »

Thanks for the reply, and your method would work to getting the torrents to a new drive... BUT the torrents would STILL be listed as being on the SAME drive letter.

Utorrent copies paths along with the files. Maybe someone at Qbittorrent needs to take a look at Utorrent.
surveyance

Re: moving torrents WITH their paths to a new drive

Post by surveyance »

That is why you have to swap drive letters before reopening Qbittorrent.
I did this in the past and it worked great. Mine was a bit more complicated as I was moving multiple partitions to non partitioned drives; however, that was just more of the same process.
The only thing I would add is to copy in groups or directories at a time. This way if there is a problem copying the long path names you know exactly where the problems. Copying the entire drive and getting hiccups can get really messy.
Also: Copy (DO NOT MOVE) - With a copy you can always delete the destination and start that part of the copy process over.
If you have a problem during a move, some files are here and some are there. That gets really messy. You also want to keep the old drive in tact for a few months till you are confident with the move.
Placing all your eggs on a single drive? That's risky. What happens if you crash that drive? Consider diversifying.
AlecLeamas

Re: moving torrents WITH their paths to a new drive

Post by AlecLeamas »

I'm in the same boat. Just want to change save paths from \\nas1\audio --> \\nas2\audio. I can't use Set Location because there's no way you can do it in bulk and have it copy the subfolders they are in.

I came across this but haven't tried it yet.

https://github.com/jslay88/qbt_migrate

Maybe it works in your case.
unseen19
Veteran
Veteran
Posts: 188
Joined: Mon Mar 15, 2021 1:36 pm

Re: moving torrents WITH their paths to a new drive

Post by unseen19 »

AlecLeamas wrote: Tue Feb 01, 2022 7:02 pm I'm in the same boat. Just want to change save paths from \\nas1\audio --> \\nas2\audio. I can't use Set Location because there's no way you can do it in bulk and have it copy the subfolders they are in.

I came across this but haven't tried it yet.

https://github.com/jslay88/qbt_migrate

Maybe it works in your case.
The "set location" works on multiple torrent, but if you have a structured set of folders (I'm on the same boat) it can take time.
What about copy the data to nas2 and rename it nas1? if the hostname is the same, as the shares, QBT will not see the difference.

(again with all torrent paused, etc)
AlecLeamas

Re: moving torrents WITH their paths to a new drive

Post by AlecLeamas »

unseen19 wrote: Wed Feb 02, 2022 11:20 am
AlecLeamas wrote: Tue Feb 01, 2022 7:02 pm I'm in the same boat. Just want to change save paths from \\nas1\audio --> \\nas2\audio. I can't use Set Location because there's no way you can do it in bulk and have it copy the subfolders they are in.

I came across this but haven't tried it yet.

https://github.com/jslay88/qbt_migrate

Maybe it works in your case.
The "set location" works on multiple torrent, but if you have a structured set of folders (I'm on the same boat) it can take time.
What about copy the data to nas2 and rename it nas1? if the hostname is the same, as the shares, QBT will not see the difference.

(again with all torrent paused, etc)
renaming the nas isn't an option for me. the set location feature would be too time consuming with thousands of torrents.

i've heard elsewhere the qbt_migrate script will do what i need, im probably going to try it soom
AlecLeamas

Re: moving torrents WITH their paths to a new drive

Post by AlecLeamas »

Just making an update, the qbt-migrate script works perfectly for this task. I was able to rename the save path of thousands of torrents easily. I migrated the data to a new nas myself.
https://github.com/jslay88/qbt_migrate
spattullo

Re: moving torrents WITH their paths to a new drive

Post by spattullo »

It is great that
https://github.com/jslay88/qbt_migrate
works, but it is just code and I am not a programmer. :) :-\
linocajo

Re: moving torrents WITH their paths to a new drive

Post by linocajo »

just wondering, I assume all torrent data files and their relative path must be stored somewhere, a flat file, a nosql database, etc.
we could maybe just manually update the path in that file or DB.
I´ve done this before with plex, EMM when I moved all videos to another drive and directories.
clancy

Re: moving torrents WITH their paths to a new drive

Post by clancy »

linocajo wrote: Sat Nov 19, 2022 10:02 am just wondering, I assume all torrent data files and their relative path must be stored somewhere, a flat file, a nosql database, etc.
we could maybe just manually update the path in that file or DB.
I´ve done this before with plex, EMM when I moved all videos to another drive and directories.
most likely stored in these files, but I don’t know how to edit them correctly
\qBittorrent\profile\qBittorrent\data\BT_backup\0a5130277f066a913b2d8eb9ab7ecae296656a91.fastresume

PS You can also see the first option in the Advanced settings, there you can switch to the experimental database storage option in SQLLite
clancy

Re: moving torrents WITH their paths to a new drive

Post by clancy »

clancy wrote: Sun Nov 27, 2022 7:54 am
linocajo wrote: Sat Nov 19, 2022 10:02 am just wondering, I assume all torrent data files and their relative path must be stored somewhere, a flat file, a nosql database, etc.
we could maybe just manually update the path in that file or DB.
I´ve done this before with plex, EMM when I moved all videos to another drive and directories.
most likely stored in these files, but I don’t know how to edit them correctly
\qBittorrent\profile\qBittorrent\data\BT_backup\0a5130277f066a913b2d8eb9ab7ecae296656a91.fastresume

PS You can also see the first option in the Advanced settings, there you can switch to the experimental database storage option in SQLLite
PSS It turned out that if you select a group of torrents in the program with the same file location and call "Torrent Options", then you can safely change the drive letter on the way, then the program will apply this change immediately to the group without any extra confirmation windows
tooponn

Re: moving torrents WITH their paths to a new drive

Post by tooponn »

Thanks for the reply, and your method would work to getting the torrents to a new drive...
jslay
Newbie
Newbie
Posts: 8
Joined: Sat Apr 01, 2017 3:07 am

Re: moving torrents WITH their paths to a new drive

Post by jslay »

spattullo wrote: Wed Nov 16, 2022 7:13 pm It is great that
https://github.com/jslay88/qbt_migrate
works, but it is just code and I am not a programmer. :) :-\
Install Python https://www.python.org/downloads/

Follow the guide on the README.

Ergo, open command prompt and run

Code: Select all

pip install qbt_migrate
qbt_migrate
Follow the on-screen prompts
jmack
Newbie
Newbie
Posts: 1
Joined: Wed Sep 06, 2023 8:57 pm

Re: moving torrents WITH their paths to a new drive

Post by jmack »

Thanks for qbt_migrate. I'm not a python person, but I couldn't get it to install.

# python --version
Python 3.7.2

#ls -al qbt_migrate-master.zip
-rw-r--r-- 1 root root 1205074 Aug 30 13:32 qbt_migrate-master.zip

# pip install ./qbt_migrate-master
Processing ./qbt_migrate-master
Installing build dependencies ... done
Getting requirements to build wheel ... done
Installing backend dependencies ... done
Preparing metadata (pyproject.toml) ... error
error: subprocess-exited-with-error

Preparing metadata (pyproject.toml) did not run successfully.
exit code: 1

[20 lines of output]
Traceback (most recent call last):
File "/usr/lib64/python3.7/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
main()
File "/usr/lib64/python3.7/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "/usr/lib64/python3.7/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 149, in prepare_metadata_for_build_wheel
return hook(metadata_directory, config_settings)
File "/tmp/pip-build-env-mzh16cf3/overlay/lib64/python3.7/site-packages/flit_core/buildapi.py", line 49, in prepare_metadata_for_build_wheel
metadata = make_metadata(module, ini_info)
File "/tmp/pip-build-env-mzh16cf3/overlay/lib64/python3.7/site-packages/flit_core/common.py", line 425, in make_metadata
md_dict.update(get_info_from_module(module, ini_info.dynamic_metadata))
File "/tmp/pip-build-env-mzh16cf3/overlay/lib64/python3.7/site-packages/flit_core/common.py", line 222, in get_info_from_module
docstring, version = get_docstring_and_version_via_import(target)
File "/tmp/pip-build-env-mzh16cf3/overlay/lib64/python3.7/site-packages/flit_core/common.py", line 195, in get_docstring_and_version_via_import
spec.loader.exec_module(m)
File "<frozen importlib._bootstrap_external>", line 728, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/src/temp/qbt_migrate-master/qbt_migrate/__init__.py", line 5, in <module>
from qbt_migrate.classes import FastResume, QBTBatchMove
ModuleNotFoundError: No module named 'qbt_migrate'
[end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

Encountered error while generating package metadata.

See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

What should I do?

Thanks Joe
Post Reply