NZB Backups by Category?

Want something added? Ask for it here.
Post Reply
methanoid
Jr. Member
Jr. Member
Posts: 66
Joined: March 7th, 2008, 6:33 am

NZB Backups by Category?

Post by methanoid »

Assuming we are storing NZB backups in a folder, what about storing ones which have a category in a sub folder...

i.e.

/files/NZB_backups/tv
/files/NZB_backups/movies
/files/NZB_backups/linuxdistros

Would make finding an old NZB file a LOT easier ;-) Maybe it can be done already and I have not worked out how yet??! :D
User avatar
jcfp
Release Testers
Release Testers
Posts: 986
Joined: February 7th, 2008, 12:45 pm

Re: NZB Backups by Category?

Post by jcfp »

You can use a postprocessing script to do that. Note that scripts receive a bunch of useful info in the form of environment variables in addition to the 8 command-line params listed, including the full path to the nzb.
methanoid
Jr. Member
Jr. Member
Posts: 66
Joined: March 7th, 2008, 6:33 am

Re: NZB Backups by Category?

Post by methanoid »

I confess I am not very good at (and hence not keen on) the scripts... but if someone wrote one .... ;)
User avatar
sander
Release Testers
Release Testers
Posts: 8811
Joined: January 22nd, 2008, 2:22 pm

Re: NZB Backups by Category?

Post by sander »

methanoid wrote: October 26th, 2020, 10:31 am I confess I am not very good at (and hence not keen on) the scripts... but if someone wrote one .... ;)
You?

Or else: you can create a bounty?
methanoid
Jr. Member
Jr. Member
Posts: 66
Joined: March 7th, 2008, 6:33 am

Re: NZB Backups by Category?

Post by methanoid »

I think the logic must be something LIKE

If $7=0 and SAB_CAT <> "" mv SAB_ORIG_NZB_GZ /mnt/tdrive/NZB_backup/SAB_FILENAME else mv SAB_ORIG_NZB_GZ /mnt/tdrive/NZB_backup/SAB_CAT/SAB_FILENAME

(first test the thing worked, then if category empty, just chuck in backup dir and if category NOT empty then move to a sub-dir with category name in backup dir)

But presumably that means I have to switch off NZB backups in the SAB config... plus this would be a bash script rather than python
Post Reply