Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Moving torrents to new location is NOT handled by qBittorrent #3896

Closed
langbakk opened this issue Oct 6, 2015 · 48 comments
Closed

Moving torrents to new location is NOT handled by qBittorrent #3896

langbakk opened this issue Oct 6, 2015 · 48 comments

Comments

@langbakk
Copy link

langbakk commented Oct 6, 2015

It's a hit or miss if "Set location" works, and if it doesn't, it just starts downloading the files again. For downloads with 200+ GB in them, this is PISSING ME OFF. This has been reported repeatedly for several builds now, without anything being done. WHY?

qBittorrent is a fairly decent download-tool, but the plethora of bugs makes it almost unuseable, simply because it takes too much manual effort to make sure things work.

This should be a minor fix to how the program looks for, searches folders and applies that information to the torrent in question.

@ghost
Copy link

ghost commented Oct 7, 2015

I recently moved 400 GB of video files to a new HDD via qB and it worked perfectly fine and was handled by qB. It took a while but I checked before and after and 100% of the data was there.

@langbakk
Copy link
Author

langbakk commented Oct 7, 2015

As I said, it's hit or miss. If you copy the files, so that they're in both the original download location, and in the new place, and then goes to set location, it usually works (not always). If you move the files, then tries to set location to make the program aware, it usually fails (especially if it's a folder). Take a look at the amount of bugs reported about the same, or similar bugs.

@sledgehammer999
Copy link
Member

Uhm wait, do you move/copy the files YOURSELF and then tell qbittorrent to change location? If yes, then that isn't how you're supposed to do it.

@langbakk
Copy link
Author

langbakk commented Oct 7, 2015

And how, exactly, am I supposed to move files around after downloading them?

@sledgehammer999
Copy link
Member

right click on torrent -> set location...
Then qbittorrent will move it (or copy it if on different disk) to the new location.

@langbakk
Copy link
Author

langbakk commented Oct 7, 2015

Oh my god. That is one of the worst "features" ever. Every other torrent-program lets you set the download location - it doesn't move or copy files. Also "set location" is very ambiguous if that's the case - it doesn't tell the user anything about the files being moved / copied to a new location if one is chosen. Last, but not least - why is it COPYING the files to a new drive? I don't want to keep the old placement, I don't want to use up double the space I need by having them in two different places, hence I would still have to go into file-manager to do some manual clean-up. Why not just allow us to set the download location and do an actual recheck on the new location after the files are moved?

@chrishirst
Copy link
Contributor

Last, but not least - why is it COPYING the files to a new drive?

If the new location is on a different drive (or file system for Linux or Mac) for the client to continue seeding all or part the payload, libtorrent HAS to have the original payload intact during the relocation, once the payload is intact on the new file system the original payload can be removed.
This is a function of how the protocol works not a 'choice'.

@ShaRose
Copy link

ShaRose commented Oct 7, 2015

Just to say it langbakk: that's how uTorrent handles it. So I don't know where you are getting this 'every other' nonsense from.

If anything though, it should have a dialogue saying that there are existing files in the folder, and whether to overwrite them or not: if not, do a force recheck to make sure everything is OK in the new position, because that would have made it obvious that it was moving the files.

@langbakk
Copy link
Author

langbakk commented Oct 7, 2015

Eh, no, that's NOT how uTorrent handles it. If you chose to set download location to somewhere else in uTorrent, it MOVES THE FILES, and removes them from the original location. Also, if you move them manually, and recheck in the new location, it doesn't start to download them all over again. Hence, uTorrent DOES IT RIGHT. Which is why I went back to uTorrent 2.2.1 a couple days ago.

@chrishirst
Copy link
Contributor

Eh, no, that's NOT how uTorrent handles it.

uTorrent does NOT use libtorrent, they have their own closed source protocol engine which also handles disc I/O.

Though I do notice you are going to use a very old uTorrent version, a version from before they rewrote their disk I/O and screwed up the queue handling.

@sledgehammer999
Copy link
Member

If new location is to another disk it first copies the data there and after it's done it deletes it from the old location. This kind of "move" is slow because of the copying.
If new location is in the same disk it just moves the data there. This move is instantaneous.

So the bug you're reporting isn't actually a bug. You aren't using the feature the correct way.
If you insist to do it your way, then after setting the location, follow up with a forced recheck.

@langbakk
Copy link
Author

If only a forced recheck WORKED, that wouldn't be a problem. It doesn't. If I move something manually, or even if I ad an already downloaded file (which have since been moved to a new location), and I set the download-location to the NEW location in the download, it STILL wants to download the file again - it doesn't help to do a recheck - for some reason, it doesn't see the file, even though I SELECT THE FILE, exact same name, everything. So, sorry, qBT is not working very well for people with complicated directory structures, a lot of relocating files and so on. I don't mind having to do some manual labor, it's just that I expect the client to not redownload stuff that is clearly there, in the folder. I was gonna try using qBT again, but to do that, I have to move a LOT of files back to the "incomplete downloads"-folder, before adding the torrents, THEN, after the client has rechecked, I can move them AGAIN, to the "new" (technically, the folder they've been in all along) folder.

@nyanpasu64
Copy link

I'm experiencing this bug, where I moved a torrent to another location, Set Location to the wrong place (Downloads/Torrent Folder/), then the right place (Downloads/). Now qBittorrent insists on redownloading the whole thing, even though the sha1sum is identical before and after redownloading. And "Force recheck" has no effect.

@tehmasterer
Copy link

Same problem as jimbo1qaz. Wasting bandwidth and time having to force recheck...

@davidhcefx
Copy link

davidhcefx commented May 11, 2018

  1. Ideally, "Set location" should check if the selected file has the same hash as the target file. If not, check in the selected path if there exists a file having the same name as the target file. If not, notify the user that it couldn't find an existing file, and ask the user whether to start downloading.
  2. If it's too hard to implement 1., then the "Set location" feature should change to a more unambiguous name, or at least have some notification such as "Couldn't find an existing file to move" and "Moved successfully"

As for the force recheck error, I think that's a different issue.

@sledgehammer999
Copy link
Member

Actually this is a libtorrent bug that I just reported: arvidn/libtorrent#3021

@kanliot
Copy link

kanliot commented Aug 15, 2019

This is my sole problem with qBittorrent. If I move a file, or all files, it's impossible to get qBittorrent to continue seeding. Instead, I have to start with the torrent file from scratch. I understand that the proper way is to ensure that nothing has changed before launching qBittorrent to move individual files, but I don't think this is realistic, since i don't use qBittorrent to Browse files.

@z411
Copy link

z411 commented Sep 14, 2019

I just got affected by this, I used Set Location to a place where the download was completed and it overwrote the completed files with the incomplete files. It's also a big torrent in a private tracker and I can't afford the ratio to re-download it. Yeah, not fun.

@Kairos88
Copy link

I also have been affected by this issue, while using the latest version (4.2.1, 64 bit): after moving downloaded files to another location I get the following error:

Collection partfile_write ... error: incorrect parameter

It's a shame that such a basic and simple feature doesn't work correctly.

@kanliot
Copy link

kanliot commented Jan 8, 2020

the solution seems to be to delete the torrent completely from your torrent software, then add all the torrents back again, through magnets and .torrent files. Then you can get libtorrent back to sanity.

@TheManchineel
Copy link

TheManchineel commented Feb 21, 2020

Can confirm this is a mess. I even pointed it back to the original location but it insists on moving files over. I'll let it run on these 650 GB worth of torrents, because it better not corrupt stuff, but next time moving torrents without removing them first will be a big no-no. I also hope I'll be able to afford the download credit on trackers to recover the torrents overwritten by partials.

@FranciscoPombal
Copy link
Member

Can anyone affected by this bug confirm that this has to do with torrents where some files are set to "do not download"?

@FranciscoPombal FranciscoPombal changed the title BUG - Moving torrents to new location is NOT handled by qBittorrent Moving torrents to new location is NOT handled by qBittorrent Feb 21, 2020
@FranciscoPombal FranciscoPombal added the Waiting info Waiting for participants to supply more info/fulfill template requirements label Feb 21, 2020
@TheManchineel
Copy link

@FranciscoPombal nope, all of my trackers have rules against doing that, so I always download the whole thing, and still got this issue.

@FranciscoPombal
Copy link
Member

@TheManchineel thanks.

I just read through the issue again. It is indeed not a qBittorrent issue. See https://github.com/arvidn/libtorrent/pull/3098/files. This is the way libtorrent works. If you want, you can post a report on their issue tracker if you think it should be changed.

Set Location is meant to be used to move the torrent to a new place where there are no existing files.
If you want to add a torrent from incomplete files, set the save directory when adding to the place where the incomplete files are, and qBittorrent should automatically start rechecking the torrents when adding the torrent. Do not use Set Location to a directory with existing files from the same torrent, that is not its purpose.

@FranciscoPombal FranciscoPombal removed the Waiting info Waiting for participants to supply more info/fulfill template requirements label Feb 22, 2020
@TheManchineel
Copy link

I still believe this should be documented better. As it is, it could easily cause data loss. The default behavior should be to notify the user with something along the lines of "Destination contains files with the same name. Are you sure you want to overwrite them with newly downloaded data?"

@FranciscoPombal
Copy link
Member

@TheManchineel I summarized related issues here: #12060

@nyanpasu64
Copy link

nyanpasu64 commented Feb 23, 2020

In my case, I did not experience data loss. After interrupting the unwanted redownload midway through, all the files were still intact and not corrupted. I don't remember how I made sure, and I no longer have the files. Maybe I checked the sha-style checksums.

My guess is that it overwrote portions of the existing files with data which was bit-for-bit identical for what was already there. I have no clue if libtorrent is guaranteed to not zero out the files first, or otherwise corrupt unused space.

@pchclx
Copy link

pchclx commented Apr 21, 2020

not sure how helpful this is but I am experiencing many of the 'move' issues described ITT. both with manual right click -> "set location" as well as auto moves that QBT is configured to make upon torrent completion. oftentimes, QBT will report the "Save Path:" as the correct, intended location, but the files are in fact not there, and are in the original 'temp DL' location. manually moving them and then rechecking does not seem to work as the re-check will fail and a full re-download will be required.

Sounds like there are a few things at play here, some of which are not fixable- but there does seem to be a bug with QBT trying and failing to move files and/or reporting their location incorrectly. QBT 4.2.3 Win x64. Usually moving between two discrete internal HDDs FWIW

@zoultrias
Copy link

Had issues moving incomplete torrents. I had a temp location to store incomplete torrents, but it became full so all my torrents were stalled. When I attempted "set location" in my mind, it would move the current incomplete files, but it wouldn't move anything. Only when it finished, it then moved the completed files to the new location. This kind of defeats the purpose of the move because the temp location I defined, happened to run out of space..... Not sure if that's intended. I guess if you defined an incomplete location, it overrides the instant move?

@Mr-Personality
Copy link

Mr-Personality commented Aug 2, 2020

Can anyone please just give me simple, clear instructions on how to move ALL my incomplete torrents to a new drive (with a different drive letter)?

I've tried doing this several times in the past and always end up LOSING files - after I recheck them, they revert to 0%!

Here's the way I think the program SHOULD work…

1. Automatic relocation
If you go into Options and change the download paths, a dialog should pop up giving you 3 options:
• Apply this new Path ONLY to future torrents
• Transfer ALL existing files to the new location [Program pauses/restarts while files are moved]
• I've already moved the files myself

2. Manual moving
Or, if you've already moved the files manually, when qBittorrent starts it should give a message saying: "Many files are missing, do you want to specify a new path for your torrent files?" and if you choose yes, and browse to the new path, the program should continue the torrents exactly where it left off.

3. Context menu
If you right-click on a torrent, you should see an option "Relocate the file…". This leads to a dialog with a location browser at the top, and two options below it:
• Transfer the files to this new location [Program pauses/restarts while files are moved]
• I've already moved the files myself

This would make it MUCH less confusing to use.

@FranciscoPombal
Copy link
Member

@Mr-Personality

Can anyone please just give me simple, clear instructions on how to move ALL my incomplete torrents to a new drive (with a different drive letter)?

Right click torrent -> set location ... - qbittorrent will move the files automatically.

To be fair, that option should probably have been named "Move to...", since "Set location..." makes it sound like you're just pointing the torrent at a new location to which you moved the torrents manually beforehand.

@Mr-Personality
Copy link

Thank you, sir!

@Mr-Personality
Copy link

Mr-Personality commented Aug 6, 2020

FranciscoPombal,

I used the "Set Location" feature to relocate a torrent to another drive, but nothing happened. The files are only moved after they've completed, not when they're incomplete. How do I move the location of incomplete files?

@FranciscoPombal
Copy link
Member

@Mr-Personality

I rarely, if ever, use that feature, but my guess is that it should work regardless of file completion state.

@glassez ping.

@Mr-Personality
Copy link

Mr-Personality commented Aug 6, 2020

OK I have now found 3 different bugs relating to this issue…

  1. Using "Set Location" to move the file doesn't work! The file remains in exactly the same place!
  2. If you've tried using "Set Location" to move a file, then later the file gets completed, the program THEN moves the COMPLETED file into the new TEMP directory!
  3. One more bug I found: I went to Options > Downloads > and changed the Default Save Path to my new drive. But when downloads complete, they're still being moved to the OLD location for completed files!

This is all totally crazy and unpredictable behavior. I've struggled with qBittorrent for years every time I tried to relocate the files, often ended up with files being re-downloaded!

And from reading through threads like this, it seems these problems have been going on for years. People have been asking for "Set location" to be renamed for years. I wonder if this will ever get fixed?

Also, surely the "Set Location" tool should also ask you for TWO locations? (Temp and Completed.) Most people will want to change both.

@xavier2k6
Copy link
Member

@Mr-Personality what version of qBittorrent are you currently using?

@Mr-Personality
Copy link

Mr-Personality commented Aug 6, 2020

@Mr-Personality what version of qBittorrent are you currently using?

v4.2.5 on Win7 x64

@glassez
Copy link
Member

glassez commented Aug 6, 2020

Currently qBittorrent can manage only one Temp folder for all torrents and you can't change it with "Set location".
I agree that this is inconvenient, so I planned to change it as soon as I have time to finish this job.

@Mr-Personality
Copy link

Currently qBittorrent can manage only one Temp folder for all torrents and you can't change it with "Set location".
I agree that this is inconvenient, so I planned to change it as soon as I have time to finish this job.

Thanks for the clarification.

All I'm trying to do is move everything to a different drive - there should be some easy way to do this. All it would take is:

  1. Button in the options: "Move temp files to a new location"
  2. Manually move the files, start qBittorrent and message appears: "Your temp files are missing. Do you want to set up a new location for them?"

@Mr-Personality
Copy link

This is strange. I recently tried using "Set location" to move individual files to a new location and it didn't work, it only moved them after completion.

But today I tried selecting ALL then doing the same thing, and it started moving them!

Not sure what the difference was?

@codeclem
Copy link

codeclem commented Oct 6, 2020

In case it helps anyone else, here's what I did to get qBittorrent to cleanly recognize files that have been relocated:

  1. Pause all torrents that are to be moved so that they are in "Completed" or "Paused" state. You need to do this to prevent qBittorrent from immediately trying to redownload anything it can't find

  2. Shut down qBittorrent, be sure to wait for it to exit cleanly. Since I use qbittorrent-nox on a headless server, I just waited for the systemctl stop qbittorrent command to return. Probably on Windows or similar it's enough to check that the process does not appear in process manager

  3. Move the files to their new location.

  4. Start qBittorrent. The moved files should now be in "Missing Files" state.

  5. Do the "Set Location" operation and point to the new location. qBittorrent will then simply recheck the files without trying to move anything.

  6. Continue seeding.

In my case I actually wasn't even moving the files. I was switching from mergerfs to aufs. qBittorrent had previously been pointing to the mergerfs union mount point and I needed it to point to the new aufs mount point instead. So in step 3 above I actually was just unmounting mergerfs. The actual files on underlying filesystems/disks had not moved, and qBittorrent trying to "move" from the mergerfs directory to the aufs directory just made it get stuck in the "Moving" state.

@Leonard2
Copy link

Leonard2 commented Feb 1, 2021

God this thread is a trainwreck.
I had a heart attack midway through reading it and thought I had lost terrabytes of data..

Anyways, changing the location of the data given a torrent is a pretty standard feature for clients nowadays.
I was very surprised to find qbittorrent is literally UNABLE to handle the case of moved data (even worse considering that in my case I didn't actually move any data, the drive letter simply got reassigned) without having to resort to literally deleting and re-adding the torrents (en masse).
It's also sad considering I was actually interested in the stats provided for individual torrents which got lost because of this issue.

@glassez
Copy link
Member

glassez commented Feb 2, 2021

qbittorrent is literally UNABLE to handle the case of moved data (even worse considering that in my case I didn't actually move any data, the drive letter simply got reassigned)

You could at least describe in detail what exactly happened in your case. Starting with the fact that when you launched the app after changing the drive letter you should have seen your torrents in the "Missing Files" state. What happened next? How did you try to fix it?
Also, information about the version of the application, libraries, OS, etc. would not be superfluous.

@Leonard2
Copy link

Leonard2 commented Feb 2, 2021

Next I tried to use "Set Location" as I assumed it did what it said it would do, just change the location (and not move files).
If the reason that this isn't handled yet is because it is meant to be used exclusively to move the files from qbittorrent and not just pointing it to the files then langbakk was absolutely right in saying it's ambiguous, I'd even say it's downright misleading at that point.

Anyways, I tried and tried to use "Set Location" and point it to the newer drive path but it just would NOT work AT ALL.
It did nothing. After using it, if I were to check if it had worked by using "Open containing folder", it would just re-open the old path again which now pointed to completely unrelated data.
I tried pausing, unpausing the torrents before and after using "Set Location" but it just wasn't possible to make it work.
I had to resort to deleting the torrents and adding them back.

I'm on Windows 10 and my qBittorrent is 4.3.3.

@GeekElectro
Copy link

GeekElectro commented Feb 17, 2021

So, was there a resolution of this issue?

I'm experiencing the same behavior on qBittorrent client v 4.3.3 for Mac. I had moved originally from Transmission because it tended to lock up too easily, on my system at least, to uTorrent, which was still a little buggy in my opinion, and settled on qBittorrent due to it being open source, seemed to be a bit more stable, and was generally easier for me to deal with.

I had to move my partial torrents to a new drive location due to space considerations, same as several others mentioned in previous comments, and noticed that moving files from within the program seemed to take a good bit longer than just doing a typical file system copy or move, so I had manually relocated them.

Previously, I had moved incomplete torrents, and then set the location, which it successfully found, and resumed the torrent download, after it automatically re-checked them. Wish I could keep track of the exact steps I took before, but in my defense, I wasn't having problems with the program behavior at that point, so I didn't think to pay attention.

I'm experiencing the same thing others have mentioned... even though I have changed the default locations in preferences, and then also used the "Set location..." option in the drop down menu to try to point qBittorrent to the current location/directory in which all of my partial torrents, and .torrent files are located, it still is not recognizing the files there.

Is there something I can do for a workaround? I have terabytes of files which I cannot simply re-download due to the massive amount of time invested, especially considering the files, and partial files are already on my drive.

Any ideas or suggestions?

Thanks!

@glassez
Copy link
Member

glassez commented Feb 17, 2021

Any ideas or suggestions?

Do you use "temporary folder" for incomplete torrents?

@GeekElectro
Copy link

No, but I got it going! Surprise, surprise!

I simply added the previous file path back, quit and restarted the program, and it found them. Didn't even require a re-check. I suppose someone could do something similar with an alias or hard link to the new location.

Maybe this behavior could be looked at to see if the program could be tweaked to more predictably handle people relocating their files?

It is a minor thing, but maybe "Set location..." could be revised to "Download location..." or something more reassuring, or less ambiguous?

Another suggestion, if I may, hopefully it wouldn't take much, but a progress and percentage bar on file moving would be helpful. As is, I'm not sure how long I need to wait, before being able to do something else.

Overall, it is a wonderful program.

@glassez
Copy link
Member

glassez commented Feb 19, 2021

@GeekElectro, #14354 should fix it.

@qbittorrent qbittorrent locked and limited conversation to collaborators Feb 28, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests