SABnzbd is a versatile tool written in Python specifically designed to take an NZB-File as input and then retrieve all of the content defined inside of it for you automatically. Recently there have been new improvements with SABnzbd in the past few releases. So I thought I’d share a working out of the box solution using RPMs. In addition to this, I’ve packaged up my notification script I wrote which can further enhance this great product.
SABnzbd and Usenet
First off; lets summarize Usenet for those who don’t use it or aren’t already familiar with it. In the simplest terms: Usenet is a great big fucking mess; a total disaster. It’s basically a location where literally anyone with access to it can post/upload all they want at their free will anonymously. Don’t get me wrong; this is cool too because it’s basically one very large hard drive without anyone telling you what you can and can’t place onto it. Seriously though, just consider for a second what your computer would look like if you allowed absolutely anyone who has access to the internet to upload content freely and without rules to it. You’d probably run out of hard disk space quickly; and you’ll be left with a lot of content everywhere. Well; that’s exactly what Usenet is (greatly simplified); it’s one large centralized location filled with petabytes of data. The thing with Usenet though is… it isn’t, and won’t be running out of disk space anytime soon.
The good news is, (thankfully) people sift through the heaps of information constantly being posted (onto Usenet) using automated tools regularly. These tools that do the sifting are generally known as Indexers. I talk more about this in another blog I wrote here a while back. But basically whenever an Indexer finds some useful data, it records the location as to where it was found. Indexers record this information in a special file call an NZB-File. NZB-Files are effectively treasure maps containing the coordinates on Usenet to which a specific piece of data can be located at.
It should be known that if you’re planning on posting/uploading stuff to Usenet yourself (for backup purposes or what have you), most (good) software will generate you an NZB-File afterwards allowing you to retrieve your data back again later on.
Now lets throw SABnzbd into the picture because it specifically is designed to retrieve content based on an NZB-File it’s provided. The process looks a little like this:
- Acquire NZB-File: Presumably you already have it because you’re just trying to retrieve data you posted in the past. But alternatively, the NZB-File could have also been acquired from and Indexer too.
- Give SABnzbd Access to NZB-File: You simply hand off your treasure map to the application who’s actually going to go out there and get the content for you.
This is truly the bread and butter of SABnzbd. The next set of steps identified below are all fully automated (and done behind the scenes) for you. They require nothing from you, but it’s worth explaining it for those who are interested.
- SABnzbd Establishes a Connection to Usenet: The catch with SABnzbd is it’s merely a vessel for fetching the data. You need to have provided it access to Usenet to which it will fetch this data from. Thus SABnzbd must (obviously) connect to a Usenet provider in order to retrieve data from Usenet itself. This step is put in place to make sure you’ve got yourself an account with a provider!
- SABnzbd Downloads Content: Segment by segment, each portion of your data is downloaded and re-assembled. There are lots of additional things that go on too such as making sure the data isn’t damaged and attempting to correct it (all automatic) if it is.
- SABnzbd Saves Data:If all goes well; and in most circumstances it will. You will have all of the content successfully retrieved at this point!
SABnzbd has tons of automation built into it; I’m really just focusing on the basics here to get you going.
I Want To Try It
Of course you do! So here’s the thing; if you’ve already connected to my repository here, you can get it by simply typing the following:
# Download and install SABnzbd plus the Notification Addon # on CentOS 7.x using the nuxref repositories located # here: http://nuxref.com/repo/ yum install -y --enablerepo=nuxref \ --enablrepo=nuxref-shared \ sabnzbd sabnzbd-script-notify
You can also just visit the location I host these packages directly (via my repository) here and download the RPMs for yourself:
Note: I provided the source rpms optionally; they are not required unless you want to build this for yourself from scratch.
It’s worth giving you a quick rundown of how the RPM installs itself upon your computer: First off, it creates a general user/group called sabnzbd. By default this is the user/group it will run as. To grant a user access to all of the content retrieved by SABnzbd, you can just add yourself to the sabnzbd group:
# as root; we can add ourselves to the sabnzbd group usermod -a -G sabnzbd myuserid # Note: if this user is logged in, they will have to log out and log # back in to have these new security credentials noticed.
You can start it up with the command:
# as root; start up SABnzbd: systemctl start sabnzbd.service
You’ll be able to access the web page through your browser by punching in http://localhost:8080.
You can set it up to survive reboots with the following command:
# as root; start up SABnzbd when the machine is first # powered on: systemctl enable sabnzbd.service
- All of your log files will show up in /var/log/sabnzbd/sabnzbd.log
- All of configuration will get written to /etc/sabnzbd/sabnzbd.conf
- All of the variable data (file processing, etc) will be located in /var/lib/sabnzbd/*. In fact this is a very important directory because unless you configure things differently, all downloaded content will appear in /var/lib/sabnzbd/complete.
SABnzbd can keep you posted on what it’s doing by sending you emails when a download completes (or fails). It can send you an notification on Pushbullet, and a few others too.
If you want to use the Notify script I wrote, you’re already almost set up and ready to go because it’s in the sabnzbd-script-notify rpm you already installed.
To enable it, you simply need to need to access the Notifications tab from within the SABnzbd Configuration section.
- Select the Enable notification script checkbox
- Select the Notify.py script from the dropdown list next to the Script category
- Next to the Parameter category, you must specify the URL(s) identifying which service(s) you want to notify.
Depending on what you want plan on alerting, the URL(s) you specify in the Parameter field will vary. You can get a better understanding of the URL options supported here.
This blog took me a very long time to put together and test! The repository hosting alone accommodates all my blog entries up to this date. If you like what you see and wish to copy and paste this HOWTO, please reference back to this blog post at the very least. It’s really all I ask.
Special thanks to Safihre for reaching out to me and allowing me to contribute to their product with the notification add-on.
- SABnzbd official website: Can’t hurt to visit the source and learn more about the product. Here is a direct link to their wiki which is great too. Here is a link to their GitHub page.
- NZB-Notify: My Notification tool with extended SABnzbd support.
- Another blog I wrote on Usenet a while back which focuses on NZBGet and other tools. The blog is still useful for even a CentOS 7 setup as I’ve ported over most of these packages too.