Page 1 of 1

All torrents lost from client after powercut, multiple times

Posted: Sun Sep 06, 2015 10:41 pm
by hemmer
Hi there,

I have found a number of posts along the lines of "I lost power and when the os restarted, the torrents were missing from deluge", which I have now suffered about 3 times. I am aware that the .torrent files are in %APPDATA%/deluge/state and I can re-add them (I have done this process twice already) but this is extremely time consuming as the torrent data is kept in various folders and need to be rechecked etc.

Is there really no way that this process can be avoided - I really enjoy using deluge normally but this unfortunately makes it unusable (it takes about an hour of manual work to return the client to the pre crash state!). The problem seems to stem from the fact that torrents.state/torrents.fastresume are overwritten when deluge is restarted after a crash and I can see no obvious backup of these. This is also clearly a common problem judging by the number of posts about this! Is there any way the client can be configured to back up the state of deluge up after a crash, or if this is already possible can someone point me in the direction of a wiki/thread where the restore process is explained? I cannot spend an hour reconfiguring every time power is lost.

Many thanks!

(deluge 1.3.11, libtorrent: 0.16.18.0, windows 10 64 bit)

Re: All torrents lost from client after powercut, multiple t

Posted: Sun Sep 06, 2015 11:57 pm
by Shryp
Yea, I see this often. I am not sure if this is a deluge issue or a libtorrent issue. You could try a newer libtorrent, but not sure if that will help.

My advice is get a UPS and configure your computer to auto shutdown during a power outage. That would be best practice for everything else on your computer anyway.

Re: All torrents lost from client after powercut, multiple t

Posted: Mon Sep 07, 2015 11:37 am
by hemmer
Is is possible to swap out libtorrent libraries relatively easily on Windows?

As for the UPS - in theory that sounds like a sensible addition, but one of the previous times Windows locked up and needed a hard reboot so it wouldn't have helped then. Also it seems a shame that hardware is required when surely a software solution is possible (I don't recall this issue in utorrent for example).

Re: All torrents lost from client after powercut, multiple t

Posted: Mon Sep 07, 2015 1:25 pm
by Cas
It is a deluge issue as far as we can tell. I have applied a fix to 1.3-stable that should hopefully resolve this on Windows in the next release. The problem with this issue has always been being able to replicate it so have been taking educated guesses to resolve it. In the meantime simply having regular backups of the config would be the best solution so you do not lose everything.

Re: All torrents lost from client after powercut, multiple t

Posted: Mon Sep 07, 2015 5:30 pm
by Shryp
Updating libtorrent on windows is easy. See these 2 links for several different builds. On the second link click on is "Python Libtorrent Builds" link.

http://forum.deluge-torrent.org/viewtop ... 12&t=50735

http://doadin.github.io/

Updating is easy:

libtorrent file = C:\Program Files (x86)\Deluge\libtorrent.pyd

Step one: Shutdown deluge and daemon.
Step two: rename/backup/copy your existing libtorrent file. I suggest adding .orig or .bak to the end of the file.
Step three: copy the new file over.
Step four: restart deluge.

Cas' says it most likely won't fix your issue, but if you can get it to work your copy of deluge will probably download/upload better. If you have troubles just delete the new file and rename your original back.

Re: All torrents lost from client after powercut, multiple t

Posted: Mon Sep 07, 2015 7:27 pm
by hemmer
OK thanks for the advice, I'll try the new builds when I have time. I have since managed to restore the folder %APPDATA/deluge folder using Window Restore from a few weeks back which is nice - other people who have this issue might be able to do something similar!