[GUIDE] Transmission iocage jail relocation

xxsj

Dabbler
Joined
Aug 2, 2014
Messages
26
Hey all,


I didn't see any sort of help for this, so I thought I'd lend a hand to anyone who had the same troubles as me getting their Transmissions jails ported over for the iocage update... I'm not going to be super in depth, but in short, here's the commands I had to run to get everything in place for each of my transmission jails:

Code:
mv /mnt/iocage/jails/transmission_4/root/usr/local/etc/transmission/home /mnt/iocage/jails/transmission_4/root/usr/local/etc/transmission/home.bkp
mkdir /mnt/iocage/jails/transmission_4/root/usr/local/etc/transmission/home
cp -R /mnt/evo850/jails/transmission_4/usr/pbi/transmission-amd64/etc/transmission/home/* /mnt/iocage/jails/transmission_4/root/usr/local/etc/transmission/home/
cp -R /mnt/iocage/jails/transmission_4/root/usr/local/etc/transmission/home.bkp/* /mnt/iocage/jails/transmission_4/root/usr/local/etc/transmission/home/
chown -R 921:921 /mnt/iocage/jails/transmission_4/root/usr/local/etc/transmission/home


This is, of course, assuming you're aware of a few things the following things:

1) Your existing jail is located at /mnt/evo850/jails/transmission_4/
2) Your new iocage jail that is replacing it is located at /mnt/iocage/jails/transmission_4/
3) You've already migrated your mount points, network configuration, etc. This is purely to restore your large seeding list and active torrents :)
4) Your legacy transmission instance may instead be located in ./var/db/transmission/ of the jail root, instead of ./usr/pbi/transmission-amd64/etc/transmission/home
5) The user/group 921:921 is returned for home.bkp when you run
Code:
ls -la /mnt/iocage/jails/transmission_4/root/usr/local/etc/transmission/
 

ellock

Cadet
Joined
Nov 25, 2019
Messages
4
Out of interest do you generally use the same download location for all of your torrents prior to the migration?

I've got a very large torrent seed list and found that migrating the .torrent files resulted in all of the newly loaded torrents defaulting to the default download-dir location and not the location previously used in the old torrent jail. I'm considering having a symlink from the default location to each of my custom targets to avoid this issue in the future.

Unfortunately I realised this after a restart of the jail and after transmission had downloaded 50Gb of data from numerous trackers, data I already had in another location. A real ratio killer!

So far I have not worked out how to preserve the download location as part of the migration so am in the middle of setting the default and moving the relevant torrent types, restarting, repeat. Seems to be a workable solution though made frustrating by the strange extended time my transmission daemon takes to start fully. (another issue to resolve at some point)
 

Tigersharke

BOfH in User's clothing
Administrator
Moderator
Joined
May 18, 2016
Messages
890
Out of interest do you generally use the same download location for all of your torrents prior to the migration?

I've got a very large torrent seed list and found that migrating the .torrent files resulted in all of the newly loaded torrents defaulting to the default download-dir location and not the location previously used in the old torrent jail. I'm considering having a symlink from the default location to each of my custom targets to avoid this issue in the future.

Unfortunately I realised this after a restart of the jail and after transmission had downloaded 50Gb of data from numerous trackers, data I already had in another location. A real ratio killer!

So far I have not worked out how to preserve the download location as part of the migration so am in the middle of setting the default and moving the relevant torrent types, restarting, repeat. Seems to be a workable solution though made frustrating by the strange extended time my transmission daemon takes to start fully. (another issue to resolve at some point)
I do not use transmission, instead preferring qbittorrent so I can only guess. Might transmission be doing some sort of indexing or cache'ing or renaming/moving? qbittorrent has some options including a 'move after completion' and deletion of .torrent files, and more similar related things, so perhaps transmission has similar features. I would expect that ZFS would add little to no overhead with regard to a program startup such as torrenting software, or anything really. I believe you're right that it is likely transmission itself, though being a plugin on the FreeNAS, IF it were to cause considerable disk traffic (such as mentioned above) that may cause a delay.

I wish you success in ironing everything out.
 

ellock

Cadet
Joined
Nov 25, 2019
Messages
4
I do not use transmission, instead preferring qbittorrent so I can only guess. Might transmission be doing some sort of indexing or cache'ing or renaming/moving? qbittorrent has some options including a 'move after completion' and deletion of .torrent files, and more similar related things, so perhaps transmission has similar features. I would expect that ZFS would add little to no overhead with regard to a program startup such as torrenting software, or anything really. I believe you're right that it is likely transmission itself, though being a plugin on the FreeNAS, IF it were to cause considerable disk traffic (such as mentioned above) that may cause a delay.

I wish you success in ironing everything out.

Thanks for the well wishes... I suspect Transmission stores the metadata about where a torrent was downloaded somewhere but I'm yet to find it.

Changing the default location and migrating torrent files is working for 90% of torrents, 100% of those created and seeded by me and 80% of those downloaded from others, most of the issues are my own fault for being pedant about folder naming conventions. The names are different to the torrent file name and thus don't align. I believe I should be able to resolve these in due course manually or otherwise.

The transmission plugin within the warden jail is snappy to start even with hundreds of torrents compared to some 15-20 minutes for the iocage plugin variant startup. I would look at starting out fresh again but I'm finding I'm in too deep now!

If I discover any useful hacks along the journey I'll be sure to come back and update here.
 

ellock

Cadet
Joined
Nov 25, 2019
Messages
4
For anyone working to migrate I found a reference to how transmission stores download paths, there is a corresponding torrentname.resume file located in the /transmission/resume folder.

By parsing each of these files for "destination" and "files" details you can reconstruct your specific download locations rather than accepting the default.

This didn't really help me as I didn't have the resume folder in my backup (fixed that now).

If you are looking to migrate torrent clients perhaps check out this tool too:

Currently supported clients include (names are case-insensitive):

  • "Deluge" (only export)
  • "rTorrent" (only export)
  • "Transmission" (only import)
  • "TransmissionMac" (only import)
  • "uTorrent" (only export)
 

ellock

Cadet
Joined
Nov 25, 2019
Messages
4
Happy to confirm that I performed a migration from Freenas Jail based Transmission to a Synology Docker container instance without any issues.

  1. Matched the mapped folder paths between the Jail and the Docker container (removes any need to modify paths)
  2. Started the Docker instance to get configuration base
  3. Migrated the settings.json and tweaked to match new host
  4. Migrated folders to new container config location
    • torrents
    • resumes (the key to everything working!)
  5. Started Docker container
    • All torrents were completed and seeding without any need for local file validation
    • The only failed torrents were some early downloads which had gone to a default location within the Freenas jail
 
Top