Client instability followed by loss of all torrents

General support for problems installing or using Deluge
Post Reply
tinkerer
New User
New User
Posts: 2
Joined: Wed Jan 05, 2022 9:54 pm

Client instability followed by loss of all torrents

Post by tinkerer »

I've spent some time looking through existing threads, and found a couple similar situations, but with what seemed to me like critical differences from my current challenge. Hopefully this isn't something obvious that I should have pieced together. I really appreciate any help!

I'm running Deluge in the LinuxServer.io Docker container. I think it was 2.0.3 up until last night (now it's 2.0.5, since I tried upgrading in my attempts to resolve the issue). I seed a fair number of torrents (a bit over 650).

Over the previous few days I was having quite a bit of instability. Whenever I added new torrents to the client, it would intermittently crash. I'd have to restart the container, and it would go for a while, then crash again. But if I wasn't downloading, it was generally okay.

Sometimes when I'd restart, the client wouldn't return to the previous state, and would show zero torrents. When that I happened, I could restart it again, and the previous state would come back, with all torrents up and running.

But last night, after one of the restarts, I couldn't get the previous state to come back. I can see that in /.config/deluge/state that all 650+ .torrent files are in the folder. But I'm not sure if my torrents.fastresume and torrents.state files are beyond hope for recovering the state.

I'm hoping someone here is up for helping take a look at these files and/or give me some advice on any hope I may have of recovering all these seeds. Unfortunately, I'm not familiar at all with how these files are structured or supposed to look (for example, should every torrent be listed in them?).

torrents.fastresume contents:

Code: Select all

d40:002644d6f477208fdc340d63468f829d8fe655382142:d11:active_timei1115214e10:added_timei1640254671e15:announce_to_dhti0e15:announce_to_lsdi0e20:announce_to_trackersi0e12:auto_managedi0e12:banned_peers6:QlÉÌIÁ13:banned_peers60:16:blocks per piecei32e14:completed_timei1640254996e19:download_rate_limiti-1e10:file sizeslli40974686ei1640254749eeli32775090ei1640254751eeli32274756ei1640254781eeli31307969ei1640254789eeli30374995ei1640254829eeli30344056ei1640254853eeli30330186ei1640254889eeli29714828ei1640254929eeli28338699ei1640254936eeli26947460ei1640254963eeli26187167ei1640254978eeli24803431ei1640254995eeli7782971ei1640254996eeli12354ei1640254994eeli2355ei1640254994eeli1055ei1640254994eee11:file-format22:libtorrent resume file12:file-versioni1e13:file_priorityli4ei4ei4ei4ei4ei4ei4ei4ei4ei4ei4ei4ei4ei4ei4ei4ee13:finished_timei1114889e9:info-hash20:
torrents.state contents:

Code: Select all

€cdeluge.core.torrentmanager
TorrentManagerState
q
*Note that I left the mis-encoded characters at the beginning of this file, in case that's revealing of something.

Apologies for the wordiness. My hope is that erring on the side of too much info would make it easier to help, rather than having to pull every detail out of me one by one. :D

Thanks so much for any help you may be able to give!
tinkerer
New User
New User
Posts: 2
Joined: Wed Jan 05, 2022 9:54 pm

Re: Client instability followed by loss of all torrents

Post by tinkerer »

Closing the loop on this...

Since it didn't look like anyone had ideas for restoring the state, I dug around for alternative ways to make reloading all those lost torrents less painful than manually adding them back in one-by-one.

As luck would have it, because Deluge kept all the .torrent files in the .config/deluge/state directory, I was able to use a very slick little Python utility called Autotorrent (https://github.com/JohnDoee/autotorrent) to reload almost everything. Out of the 650+ that were lost, I only had to manually reload around 20, which was an incredible time saver.

Still, this was an important lesson learned, and from now on I'll set a periodic backup of my client's state directory.

Hopefully this is helpful for someone in the future! :)
mhertz
Moderator
Moderator
Posts: 2195
Joined: Wed Jan 22, 2014 5:05 am
Location: Denmark

Re: Client instability followed by loss of all torrents

Post by mhertz »

Thanks for posting back your solution and I'm sorry we couldn't help you with this. I'd guess one could also use autoadd plugin to define a watch holder and drop all of them in there, or your solution which very possibly better, as honestly don't know much about it. BTW, if you use yarss2 plugin, then there have been several reports about crashings because of that, so just a little heads-up.

Anyway, thanks again for posting back, and for showing good style of helpfulness coupled with "patience" in general :)
heyijust
New User
New User
Posts: 1
Joined: Fri Nov 11, 2022 11:30 pm

Re: Client instability followed by loss of all torrents

Post by heyijust »

For people who found this recently via google or just searching.

A possible solution would be to look for the `achive folder` found with in the .config/deluge directory.
In this folder should hopefully be a bunch of tar.xz files containing back ups of the torrent states.

Take the latest before the crash / you lost all your torrents and extract it inside should contain 4/5 files with names such as:
> torrents.fastresume
> torrents.fastresume.bak
> torrents.state
> torrents.state.bak

Back up the equvilent files found within the state folder (which will have a load of torrent files).
Take the ones you extracted and replace the ones in the state folder.

Restart deluge and hopefully you should have your torrents back :)
Post Reply