I've got two separate instances of deluge (they have separate conf directories) running on linux.
They both have about 500 torrents each. There is some overlap between the two.
I would like to migrate all of the torrents to just one instance of deluge. Is there an easy way to do it?
Is there a hard way that is still easier than manually migrating them one at a time?
I'm proficient with perl and I've looked at the torrents.state file, but without any documentation I can't seem to properly merge one torrent.state into another, the result is usually the deluge freaks out - usually it dies or just sort of hangs. I was able to merge about 10 torrents, but now that I am looking at around 500 it just doesn't seem to want to work for me.
Is there documentation on the format of torrents.state file?
FYI, the reason I ended up with two instances of deluge was because I had two internet connections. Since deluge doesn't support multiple interfaces (as in advertising to the tracker that I have two IP addresses) I just ran two copies and bound them to each connection separately. But keeping both copies synchronized is a PITA so I am going back to one instance of deluge and will try other ways to advertise to the tracker.
Merge two deluge's into one?
Re: Merge two deluge's into one?
There is no real documentation for the format of this file.. It's basically a pickled object and you will likely get better luck using python to write a merge script, but it will be a bit of a pain.Suzuka wrote:I've got two separate instances of deluge (they have separate conf directories) running on linux.
They both have about 500 torrents each. There is some overlap between the two.
I would like to migrate all of the torrents to just one instance of deluge. Is there an easy way to do it?
Is there a hard way that is still easier than manually migrating them one at a time?
I'm proficient with perl and I've looked at the torrents.state file, but without any documentation I can't seem to properly merge one torrent.state into another, the result is usually the deluge freaks out - usually it dies or just sort of hangs. I was able to merge about 10 torrents, but now that I am looking at around 500 it just doesn't seem to want to work for me.
Is there documentation on the format of torrents.state file?
FYI, the reason I ended up with two instances of deluge was because I had two internet connections. Since deluge doesn't support multiple interfaces (as in advertising to the tracker that I have two IP addresses) I just ran two copies and bound them to each connection separately. But keeping both copies synchronized is a PITA so I am going back to one instance of deluge and will try other ways to advertise to the tracker.
Can you simply add the torrent files in your ~/.config/deluge/state folder? Or do you have custom options/save paths for these torrents?
Re: Merge two deluge's into one?
Nearly every torrent has a custom save path - I have my own naming convention so I end up changing the save path on nearly every single torrent.
FWIW, it would be nice if the fastresume files were completely self-contained - i.e. no actual torrent.state information needed in a global file. Then it would be a simple matter of copying the torrents and the fastresumes from one state directory to another. It would also be more robust in the event of corruption - if the torrent.state gets corrupted, all the torrents are dorked.
Unfortunately I know zero python, so writing a merge script means learning python first. Do you know if there is a tool to convert pickled object to/from something a little more friendly like comma-separated text?
FWIW, it would be nice if the fastresume files were completely self-contained - i.e. no actual torrent.state information needed in a global file. Then it would be a simple matter of copying the torrents and the fastresumes from one state directory to another. It would also be more robust in the event of corruption - if the torrent.state gets corrupted, all the torrents are dorked.
Unfortunately I know zero python, so writing a merge script means learning python first. Do you know if there is a tool to convert pickled object to/from something a little more friendly like comma-separated text?
Re: Merge two deluge's into one?
I agree with you. I've wanted to change the way the torrent state is saved and move away from the pickled object as it's not a very good solution.Suzuka wrote:Nearly every torrent has a custom save path - I have my own naming convention so I end up changing the save path on nearly every single torrent.
FWIW, it would be nice if the fastresume files were completely self-contained - i.e. no actual torrent.state information needed in a global file. Then it would be a simple matter of copying the torrents and the fastresumes from one state directory to another. It would also be more robust in the event of corruption - if the torrent.state gets corrupted, all the torrents are dorked.
Unfortunately I know zero python, so writing a merge script means learning python first. Do you know if there is a tool to convert pickled object to/from something a little more friendly like comma-separated text?
Unfortunately it's not that easy, since it's a custom object that would need to be handled specially.