chros73 edited this page Oct 7, 2018 · 40 revisions

Automated rTorrent-PS-CH configuration

An almost completely automated setup with the patched version of rTorrent-PS, rTorrent-PS-CH (requires v1.8.3-0.9.7 or newer) that doesn't need any additional UI only an SSH client (with the help of tmux), with category support, requiring the least amount of human interaction, including config files/scripts/instrucions for FTP, Samba, email reporting and many more.

Extended Canvas Screenshot

Introduction

It's all about seeding data all the time until we can (unfortunately we have to download it before :) ). This is not the official PyroScope way to do things, I have to start with this. :) The project has been started around late 2014 with the curiosity of how many really useful things can be done with pure rtorrent. As it turned out a lot.

The whole setup is based on an advanced version of Stefano's idea of download manager: it relies on moving data AND meta files all around the place. Please take the time and read more about Queue Manager.

It also includes some really unique ideas, so there's no need for ratio groups, stopping/starting torrents (either manually or by a script), deleting anything manually: it runs every torrent all the time, favours one group of torrents over 2 other groups of them and if it run out of space it'll try to create more by deleting old ones. These features alone make this setup so powerful! :)

This setup runs on a laptop from 2008 with dualcore CPU and 4GB of RAM with Ubuntu 14.04 (probably all other Debian flavor works fine, I don't know about the rest) and a 4TB HDD hooked up via ESATA with a net connection of 74/20 Mbps. It never stops until it gets power. :)

"Why is it just almost completely automated?" Well, because you, dear adventurer, have to figure out by yourself how to automate downloading of torrents, e.g. using flexget or writing your own script (there's also a sample download script).

Limitation

"What?! Is there any?!" Well, yes. :) The following is not supported (mainly because of auto-rotating torrents feature in queue script and lack of interest :) ):

  • multiple disk device support (only 1 disk is supported) (read more: #77)

Features

"OK, I can live with that, so what can it do?" Good question, let's see (most important ones come first):

  • it's disabled by default (you have to enable it with AUTOROTATETORRENTS=true in queue script)
  • favouring one group of torrents over 2 other groups of them (read more)
  • hash-checking dropped data (read more)
  • full magnet link support (read more)
  • p2p blocklist support (read more)
  • regularly updates scrape information for all torrents (read more)
  • extra columns on the fully customizable extended canvas (read more)
  • sending email reports automatically (read more)
  • logging major events on screen and into file (read more)
  • regularly backup session dir of rtorrent (with the help of backup script)
  • auto-starting rtorrent in tmux if it's not running (with the help of init script)
  • providing config files / instructions for setting up / using FTP , Samba, SSH (e.g. for Windows)
  • providing instructions for using it On-the-Road with an Android device (read more)
  • and a lot more :)

Useful additions in rtorrent

"Sounds awesome! What else?" There are extra stuff defined in all over the setup:

  • variables in rtorrent: cfg.inotify.use, cfg.blocklist.use, cfg.magnet_link.queue, cfg.external_dnscache.use, cfg.interface.bind, cfg.scrape_interval.[active|idle], pyro.last_xfer.min_rate, cfg.slowup.d.[peers_min|peers_max|uploads_max], cfg.[slowup|tardyup].uprate.[min|max], cfg.[slowup|tardyup].slots.[leech|seed].max, cfg.global.downrate.[min|max], cfg.global.[upall|upmain].threshold, cfg.global.slot.uprate.min, cfg.dir.[main|sub|incomplete|meta_downl|meta_compl|delqueue|session|logs], cfg.postfix, cfg.theme.[0|1|2], pyro.bin_dir, pyro.[extended|extended.ch], pyro.[log_archival|log_retention].days, [system.]startup_time
  • attributes in rtorrent: unsafe_data, data_dir, meta_dir, orig_category, tm_downloaded, tm_loaded, tm_started, tm_completed, last_active, last_xfer, activations, tm_last_scrape
  • commands in rtorrent: d.move_to, d.move_meta_to, d.data_path, d.session_file, d.remove_data, d.add_to_delqueue, d.remove_from_delqueue, d.fix_delqueue_flag, d.get_ratio_float, d.get_progress_num, d.modify_slots_both, d.last_scrape.send_set, d.timestamp.downloaded, d.timestamp.last_active, d.timestamp.last_xfer, d.last_xfer.is_active, uptime, hrf_time, get_uprate_main, get_total_rotating_size, os.path.mtime, pyro.import, pyro.print_help, pyro.ui.messages.show, pyro.view.toggle_visible, quit
  • views in rtorrent: ^ rtcontrol, ! messages, t trackers, : tagged < datasize, > uploadeddata, % ratio, @ category, ? deletable, ¬ last_xfer
  • keyboard shortcuts in rtorrent: } toggle unsafe_data, # send manual scrape request, . toggle tag, T clear tag view, ^g display tags, _ toggle visibility of specified columns, | toggle selectable themes, = toggle autoscale network history, home, end, pgup, pgdn, F2 display quick help, ^q DISABLED (used to exit rtorrent)
  • Bash functions: rtlistOrphans, rtlistOrphanMetas, rtlistPublic, rtlistStuck, rtlistMessages, rtlistStopped, rtgetTotalRotatingSize
  • Bash scripts: addMagnetLinksAria2.sh, addMagnetLinksNative.sh, doBackup.sh, queueTorrent.sh, reportMessages.sh, reportOrphans.sh, reportOrphanMetas.sh, reportPublic.sh, reportStopped.sh, reportStuck.sh, reportLowRotatingSpace.sh, rtUtils.sh, sampleDownload.sh, rtorrent init script

See Additions page for more details.

Basic usage

"The whole thing is a little bit confusing now." Let's try to show how simple the workflow is:

  • download/upload/copy a torrent file into one the subdirs of .queue dir (the queue script will pick it up)
  • alternatively put hash-checkable data into incomplete dir and put its meta file into one the subdirs of .downloading dir (hash-checking will start immediately)
  • when download/hash-check is finished data and meta will be moved into it's final place
  • you can move it to a different category later using this command in rtorrent: d.move_to=unsafe,1,2
  • you can simply put it into delete queue by pressing } key multiple times
  • you can still delete a torrent manually if you insist by ^d^d

It's really that simple. :)

Hints and possible issues

"It indeed looks easy. What if I encounter a problem?" Then see Hints and possible issues WIKI page for more details.

Migration

"It's kind'a cool! The problem is that I have already a working setup. What shall I do?" It's easy:

  • make a backup first :)
  • set up everything according to the new setup
  • hash-ckeck all the existing data with the new setup (it will take care about everything else)

"Woow! But what about my previous local stats?" Well, nothing comes for free. :)

Installation

"Okie, I kind'a like it. What should I do now?" Well, go through the detailed Installation instructions, although it won't be a 5 minutes task :) , so let's summarize it first:

  • install rTorrent-PS-CH (v1.8.3-0.9.7 or newer) and pyrocore utilities with tmux
  • go through all the files in this project and modify them according to your setup/needs
  • if you find a missing command on your system then install it (although every command should be covered by the Installation instructions)
  • if you don't use a Debian based OS then you have to check every command switch whether it's compatible with your system

"Oh, my ... That's a lot of work!" Well, it took way more time to create it and document it. :) Good news is: you only have to do it once. :)

Performance tuning

"Huhh, I finally managed to set it up, but what values should I use in rTorrent config?" Take a look at the official rTorrent WIKI page.

Change log

"All's good now." See CHANGELOG.md for more details.

Disclaimer

"I just got data deleted!" Be careful! This setup can and will delete your data if you ask for it!

Only enable auto-rotating torrents feature in queue script (it's disabled by default) if you understand the basic concept of this setup and you configured everything as it should be!

This setup doesn't take any responsibility for data loss for any reason.

Acknowledgement

"That's awesome!" Thanks to the following people, sites:

You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.