Save Successful NZB Files ONLY

Get help with all aspects of SABnzbd
Forum rules
Help us help you:
  • Are you using the latest stable version of SABnzbd? Downloads page.
  • Tell us what system you run SABnzbd on.
  • Adhere to the forum rules.
  • Do you experience problems during downloading?
    Check your connection in Status and Interface settings window.
    Use Test Server in Config > Servers.
    We will probably ask you to do a test using only basic settings.
  • Do you experience problems during repair or unpacking?
    Enable +Debug logging in the Status and Interface settings window and share the relevant parts of the log here using [ code ] sections.
Post Reply
methanoid
Jr. Member
Jr. Member
Posts: 66
Joined: March 7th, 2008, 6:33 am

Save Successful NZB Files ONLY

Post by methanoid »

I have long used the NZB Backup folder to store NZBs but I find quite a few NZBs fail to download due to DMCA etc and I want to store the NZBs of successful downloads ONLY. Is that possible or do I need to somehow script it?

Looking on Wiki I found this with a typo BTW?

Code: Select all

.nzb Backup Folder

Advanced	When SABnzbd adds an nzb to the queue it creates a local [word missing COPY???] of the NZB file in this folder. If you leave this box empty, no files will be saved.
User avatar
sander
Release Testers
Release Testers
Posts: 9061
Joined: January 22nd, 2008, 2:22 pm

Re: Save Successful NZB Files ONLY

Post by sander »

Post-processing script.

Or: use history1.db to see Failed downloads, and (re)move them from your backup dir

Code: Select all

sander@zwart2204:~/.sabnzbd/admin$ sqlite3 history1.db .dump  | grep Failed | awk -F, '{ print $3 }'

'reftestnzb-obfuscated-rar-files-no-par-073afc9c3cb0'
'reftestnzb__fully_encrypted__meta_password__46d021b78b44'
'fully2'
'fully3'
'test_download_100MB'
'113-a440126c62802ef1560c17c99fd9fe84-yEnc-104857600'
'1666285694'
'missing_stuff_download_100MB'
'missing_stuff_download_100MB'
'63fbdf3799fd053eaa15343e'
'63fbdf3799fd053eaa15343c'
Or, less brute force:
go into your backup dir, and of each .nzb find out the status in history1.db. If Failed, (re)move from backup dir.
methanoid
Jr. Member
Jr. Member
Posts: 66
Joined: March 7th, 2008, 6:33 am

Re: Save Successful NZB Files ONLY

Post by methanoid »

Could I tack something LIKE (I dont claim to follow the script rules!!)

if ($7 NE 0) rm /location_of_NZB_backups/$SAB_FILENAME

to the end of all my post processing scripts which basically do some simple file manipulations on jobs that have passed?
User avatar
sander
Release Testers
Release Testers
Posts: 9061
Joined: January 22nd, 2008, 2:22 pm

Re: Save Successful NZB Files ONLY

Post by sander »

Looks like a plan!


Tip:
you could use $1 instead of $SAB_FILENAME
nzb's are backed up as ...gz . So add that at the end of $SAB_FILENAME
methanoid
Jr. Member
Jr. Member
Posts: 66
Joined: March 7th, 2008, 6:33 am

Re: Save Successful NZB Files ONLY

Post by methanoid »

I think a friend is gonna tack this at beginning of a script he's made to store NZB files by the category they were in. Kinda think this could be a switch option in SABnzbd if @safihre wanted to add some feaures ;)
Post Reply