Page 1 of 1

lost all torrents

Posted: Sat Apr 27, 2024 11:07 am
by pjlbyrne
I seem to have lost all my torrents. I guess it's possible its due to something I did, but is anyone aware of recent changes that might cause this.

1400 torrents to find and re-add! Should have taken a backup....

Re: lost all torrents

Posted: Sat Apr 27, 2024 11:13 am
by pjlbyrne
Argh I can still see 1362 torrents in the 'state' directory but they didn't resume. Why isn't the torrents.state file text-readable dammit!

Re: lost all torrents

Posted: Sat Apr 27, 2024 3:03 pm
by mhertz
Sorry to hear. You could try the python code posted by tobbez, but keep backups first obviously, somewhere in this thread: viewtopic.php?p=235085#p235085

Otherwise have to script it with deluge-console, or autoadd plugin alternatively.

Re: lost all torrents

Posted: Sat Apr 27, 2024 11:31 pm
by ambipro
autotorrent2 can add the torrents automatically. It's not a super simple configuration process, but I used to use it.

Re: lost all torrents

Posted: Sun Apr 28, 2024 10:16 am
by pjlbyrne
Thank guys - I was able to restore to a backup from last October, which covers 95% of the state. I will take the opportunity to (a) backup deluge/.config/deluge dir nigthly and (b) go through all torrents and consolidate the file paths.

Wish I had the time to work on my own t____t software. I think a structure where the torrent manager was a totally separate process from the GUI would be much nicer. I haven't looked at it much but that 'twisted' python framework looks like a nightmare. I would store all the state in YAML too so it's human-readable.

Re: lost all torrents

Posted: Sun Apr 28, 2024 10:35 am
by mhertz
Good job and nice to hear you recovered :)

Yes, keep backups, and if not haden't, then first time seeing issue, then backup immediately, to experiment safely, e.g the posted python code etc as if continually restarting to see if somehow comes back, will then clear saved state I would guess(torrents.state file). Would be nice to figure out what issue actually is, well seemingly a char issue in a torrent, but why Latin should work instead utf I don't get(former subset of latter), but whatever. Hmm, should try force such a scenario if possible, so could test that workaround(latin VS utf8 - Also there's an ignore param if remember right though not looked at it for years). I did make a ticket atleast, in previous linked thread.

The ui and core is seperate though, and there's been talk for years, and some effort done already, to eventually migrate away from twisted, as overkill for this, if remember right.

Prefer plaintext myself also, but the disadvantages outwhey the advantages often, is main consideration.

Anyway, glad you got it fixed.