Did Sabnzbd just wipe my entire TV folder contents?

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
mach1ne
Newbie
Newbie
Posts: 11
Joined: September 5th, 2013, 3:42 pm

Did Sabnzbd just wipe my entire TV folder contents?

Post by mach1ne »

I hope someone can shed some light on this for me.
So a quick run-through of my setup:
Synology Nas Drive running Sonarr, Radarr and Sabnzbd within Docker Containers....I just upgraded all three programs to the latest versions which resulted in a completely new redesign of Sonaar and Radarr and with that I started seeing warning messages such as:

"Download client sabnzbd places downloads in the root folder /movies. You should not download to a root folder."
and
"Download client Sabnzbd places downloads in the root folder /tv. You should not download to a root folder."
So like a good little boy I set off to investigate and 'fix' the issues.

Here are the folder locations which Sonarr and Radarr are using:
/tv
/downloads/sabnzbd/complete
and
/movies
/downloads/sabnzbd/complete

So looking at Sabnzbd the folders used are:
Temporary Download Folder - /downloads/sabnzbd/incomplete
Completed Download Folder - /downloads/sabnzbd/complete
Watched Folder - /downloads/nzb

Categories are :
Image

Now I think the issue started when I set the Enable TV Sorting option in Sabnzbd after a test download (spitting image series 19 episode 2) was used to check my download settings, the file was downloaded but was not moved into the Spitting Image folder on my Synology Nas drive (something that has been happening for a while with some downloads but not all)

Image

So looking at the Sabnzbd logs I saw this and figured what happened is that a folder called /tv was created after downloading the test download and because there was already a folder called /tv which contained all the different tv series folders it just wiped it...Maybe? Here's a few lines from the log file

2021-06-18 03:08:51,805::INFO::[postproc:237] Completed Download Folder /downloads/sabnzbd/complete is not on FAT
2021-06-18 03:08:51,805::INFO::[panic:239] Launching browser with http://127.0.0.1:8080/sabnzbd
2021-06-18 03:08:51,806::INFO::[notifier:122] Sending notification: SABnzbd - SABnzbd 3.3.0 started (type=startup, job_cat=None)
2021-06-18 03:08:51,975::INFO::[zconfig:62] No bonjour/zeroconf support installed
2021-06-18 03:08:51,976::INFO::[ssdp:108] Serving SSDP on 172.17.0.5 as SABnzbd
2021-06-18 03:08:57,497::INFO::[__init__:677] Attempting to add Spitting.Image.2020.S01E02.720p.HEVC.x265.nzb
2021-06-18 03:08:57,502::INFO::[filesystem:651] Creating directories: /downloads/sabnzbd/incomplete/Spitting.Image.2020.S01E02.720p.HEVC.x265
2021-06-18 03:08:57,506::INFO::[nzbparser:134] File 4a817363e82a4f8da7a1e508c75ea731.par2 added to queue
2021-06-18 03:08:57,507::INFO::[nzbparser:134] File 4a817363e82a4f8da7a1e508c75ea731.part09.rar added to queue
2021-06-18 03:08:57,508::INFO::[nzbparser:134] File 4a817363e82a4f8da7a1e508c75ea731.vol00+1.par2 added to queue
2021-06-18 03:08:57,509::INFO::[nzbparser:134] File 4a817363e82a4f8da7a1e508c75ea731.vol01+2.par2 added to queue
2021-06-18 03:08:57,511::INFO::[nzbparser:134] File 4a817363e82a4f8da7a1e508c75ea731.vol03+4.par2 added to queue
2021-06-18 03:08:57,512::INFO::[nzbparser:134] File 4a817363e82a4f8da7a1e508c75ea731.vol07+8.par2 added to queue
2021-06-18 03:08:57,513::INFO::[nzbparser:134] File 4a817363e82a4f8da7a1e508c75ea731.vol15+3.par2 added to queue
2021-06-18 03:08:57,514::INFO::[nzbparser:134] File 4a817363e82a4f8da7a1e508c75ea731.part01.rar added to queue
2021-06-18 03:08:57,516::INFO::[nzbparser:134] File 4a817363e82a4f8da7a1e508c75ea731.part02.rar added to queue
2021-06-18 03:08:57,517::INFO::[nzbparser:134] File 4a817363e82a4f8da7a1e508c75ea731.part03.rar added to queue
2021-06-18 03:08:57,519::INFO::[nzbparser:134] File 4a817363e82a4f8da7a1e508c75ea731.part04.rar added to queue
2021-06-18 03:08:57,520::INFO::[nzbparser:134] File 4a817363e82a4f8da7a1e508c75ea731.part05.rar added to queue
2021-06-18 03:08:57,521::INFO::[nzbparser:134] File 4a817363e82a4f8da7a1e508c75ea731.part06.rar added to queue
2021-06-18 03:08:57,523::INFO::[nzbparser:134] File 4a817363e82a4f8da7a1e508c75ea731.part07.rar added to queue
2021-06-18 03:08:57,524::INFO::[nzbparser:134] File 4a817363e82a4f8da7a1e508c75ea731.part08.rar added to queue
2021-06-18 03:08:57,525::INFO::[__init__:620] Backing up /downloads/sabnzbd/incomplete/Spitting.Image.2020.S01E02.720p.HEVC.x265/__ADMIN__/Spitting.Image.2020.S01E02.720p.HEVC.x265.nzb.gz
2021-06-18 03:08:57,528::INFO::[nzbqueue:233] Saving queue
2021-06-18 03:08:57,530::INFO::[notifier:122] Sending notification: NZB added to queue - Spitting.Image.2020.S01E02.720p.HEVC.x265.nzb (type=download, job_cat=tv)
2021-06-18 03:08:58,533::INFO::[downloader:642] [email protected]: Initiating connection
2021-06-18 03:09:27,885::INFO::[nzbstuff:1747] Checking all filenames for Spitting.Image.2020.S01E02.720p.HEVC.x265
2021-06-18 03:09:27,886::INFO::[nzbstuff:1750] Re-sorting Spitting.Image.2020.S01E02.720p.HEVC.x265 after getting filename information
2021-06-18 03:09:33,218::INFO::[assembler:134] Decoding finished /downloads/sabnzbd/incomplete/Spitting.Image.2020.S01E02.720p.HEVC.x265/4a817363e82a4f8da7a1e508c75ea731.part03.rar
2021-06-18 03:09:33,887::INFO::[assembler:134] Decoding finished /downloads/sabnzbd/incomplete/Spitting.Image.2020.S01E02.720p.HEVC.x265/4a817363e82a4f8da7a1e508c75ea731.part01.rar
2021-06-18 03:09:33,890::INFO::[filesystem:651] Creating directories: /tv
2021-06-18 03:09:33,891::INFO::[misc:1066] [N/A] Running external command: ['/usr/bin/unrar', 'e', '-vp', '-idp', '-scf', '-o+', '-p-', '/downloads/sabnzbd/incomplete/Spitting.Image.2020.S01E02.720p.HEVC.x265/4a817363e82a4f8da7a1e508c75ea731.part01.rar', '/tv/']
2021-06-18 03:09:33,912::INFO::[directunpacker:431] DirectUnpacked volume 1 for 4a817363e82a4f8da7a1e508c75ea731
2021-06-18 03:09:34,062::INFO::[assembler:134] Decoding finished /downloads/sabnzbd/incomplete/Spitting.Image.2020.S01E02.720p.HEVC.x265/4a817363e82a4f8da7a1e508c75ea731.part02.rar
2021-06-18 03:09:34,165::INFO::[directunpacker:305] DirectUnpacked volume 2 for 4a817363e82a4f8da7a1e508c75ea731
2021-06-18 03:09:34,270::INFO::[directunpacker:305] DirectUnpacked volume 3 for 4a817363e82a4f8da7a1e508c75ea731
2021-06-18 03:09:38,250::INFO::[database:246] [N/A] Removing job SABnzbd_nzo_JyPuSb from history
2021-06-18 03:09:38,881::INFO::[assembler:134] Decoding finished /downloads/sabnzbd/incomplete/Spitting.Image.2020.S01E02.720p.HEVC.x265/4a817363e82a4f8da7a1e508c75ea731.part04.rar
2021-06-18 03:09:38,986::INFO::[directunpacker:305] DirectUnpacked volume 4 for 4a817363e82a4f8da7a1e508c75ea731
2021-06-18 03:09:41,032::INFO::[assembler:134] Decoding finished /downloads/sabnzbd/incomplete/Spitting.Image.2020.S01E02.720p.HEVC.x265/4a817363e82a4f8da7a1e508c75ea731.part05.rar
2021-06-18 03:09:41,134::INFO::[directunpacker:305] DirectUnpacked volume 5 for 4a817363e82a4f8da7a1e508c75ea731
2021-06-18 03:09:43,376::INFO::[assembler:134] Decoding finished /downloads/sabnzbd/incomplete/Spitting.Image.2020.S01E02.720p.HEVC.x265/4a817363e82a4f8da7a1e508c75ea731.part06.rar
2021-06-18 03:09:43,481::INFO::[directunpacker:305] DirectUnpacked volume 6 for 4a817363e82a4f8da7a1e508c75ea731
2021-06-18 03:09:43,512::INFO::[assembler:134] Decoding finished /downloads/sabnzbd/incomplete/Spitting.Image.2020.S01E02.720p.HEVC.x265/4a817363e82a4f8da7a1e508c75ea731.part07.rar
2021-06-18 03:09:43,614::INFO::[directunpacker:305] DirectUnpacked volume 7 for 4a817363e82a4f8da7a1e508c75ea731
2021-06-18 03:09:43,707::INFO::[assembler:134] Decoding finished /downloads/sabnzbd/incomplete/Spitting.Image.2020.S01E02.720p.HEVC.x265/4a817363e82a4f8da7a1e508c75ea731.part08.rar
2021-06-18 03:09:43,809::INFO::[directunpacker:305] DirectUnpacked volume 8 for 4a817363e82a4f8da7a1e508c75ea731
2021-06-18 03:09:43,924::INFO::[nzbqueue:779] [N/A] Ending job Spitting.Image.2020.S01E02.720p.HEVC.x265
2021-06-18 03:09:43,978::INFO::[assembler:134] Decoding finished /downloads/sabnzbd/incomplete/Spitting.Image.2020.S01E02.720p.HEVC.x265/4a817363e82a4f8da7a1e508c75ea731.part09.rar
2021-06-18 03:09:43,980::INFO::[nzbqueue:390] [N/A] Removing job Spitting.Image.2020.S01E02.720p.HEVC.x265
2021-06-18 03:09:43,980::INFO::[nzbqueue:233] Saving queue
2021-06-18 03:09:43,981::INFO::[postproc:134] Saving postproc queue
2021-06-18 03:09:43,982::INFO::[postproc:379] Starting Post-Processing on Spitting.Image.2020.S01E02.720p.HEVC.x265 => Repair:True, Unpack:True, Delete:True, Script:None, Cat:tv
2021-06-18 03:09:43,983::INFO::[notifier:122] Sending notification: Post-processing - Spitting.Image.2020.S01E02.720p.HEVC.x265 (type=pp, job_cat=tv)
2021-06-18 03:09:43,984::INFO::[postproc:736] Starting verification and repair of Spitting.Image.2020.S01E02.720p.HEVC.x265
2021-06-18 03:09:43,984::INFO::[__init__:924] [N/A] /downloads/sabnzbd/incomplete/Spitting.Image.2020.S01E02.720p.HEVC.x265/__ADMIN__/__verified__ missing
2021-06-18 03:09:43,985::INFO::[postproc:756] Running verification and repair on set 4a817363e82a4f8da7a1e508c75ea731
2021-06-18 03:09:43,986::INFO::[newsunpack:1111] Quick-check for 4a817363e82a4f8da7a1e508c75ea731 is OK, skipping repair
2021-06-18 03:09:43,988::INFO::[postproc:811] Verification and repair finished for Spitting.Image.2020.S01E02.720p.HEVC.x265
2021-06-18 03:09:43,988::INFO::[filesystem:300] Checking if any resulting filenames need to be sanitized
2021-06-18 03:09:43,990::INFO::[postproc:431] Running unpack_magic on Spitting.Image.2020.S01E02.720p.HEVC.x265
2021-06-18 03:09:43,992::INFO::[newsunpack:261] Unrar starting on /downloads/sabnzbd/incomplete/Spitting.Image.2020.S01E02.720p.HEVC.x265
2021-06-18 03:09:44,080::INFO::[directunpacker:305] DirectUnpacked volume 9 for 4a817363e82a4f8da7a1e508c75ea731
2021-06-18 03:09:44,085::INFO::[directunpacker:233] DirectUnpack completed for 4a817363e82a4f8da7a1e508c75ea731
2021-06-18 03:09:45,998::INFO::[newsunpack:523] Set 4a817363e82a4f8da7a1e508c75ea731 completed by DirectUnpack
2021-06-18 03:09:46,124::INFO::[newsunpack:265] Unrar finished on /downloads/sabnzbd/incomplete/Spitting.Image.2020.S01E02.720p.HEVC.x265
2021-06-18 03:11:41,148::INFO::[postproc:435] Unpacked files ['/tv/4a817363e82a4f8da7a1e508c75ea731.mkv']
2021-06-18 03:11:41,149::INFO::[filesystem:300] Checking if any resulting filenames need to be sanitized
2021-06-18 03:11:41,149::INFO::[postproc:439] Finished unpack_magic on Spitting.Image.2020.S01E02.720p.HEVC.x265
2021-06-18 03:11:41,150::INFO::[notifier:122] Sending notification: Error - Cannot change permissions of /tv (type=error, job_cat=None)
2021-06-18 03:11:41,150::ERROR::[filesystem:570] Cannot change permissions of /tv
2021-06-18 03:11:41,151::INFO::[filesystem:571] Traceback:
Traceback (most recent call last):
File "/app/sabnzbd/sabnzbd/filesystem.py", line 566, in set_chmod
os.chmod(path, permissions)
PermissionError: [Errno 1] Operation not permitted: '/tv'
2021-06-18 03:11:41,152::ERROR::[filesystem:570] Cannot change permissions of /tv/@eaDir/Modern Family@SynoResource
2021-06-18 03:11:41,153::INFO::[filesystem:571] Traceback:
Traceback (most recent call last):
File "/app/sabnzbd/sabnzbd/filesystem.py", line 566, in set_chmod
os.chmod(path, permissions)
PermissionError: [Errno 1] Operation not permitted: '/tv/@eaDir/Modern Family@SynoResource'
2021-06-18 03:11:41,153::ERROR::[filesystem:570] Cannot change permissions of /tv/@eaDir/The Walking Dead@SynoResource
2021-06-18 03:11:41,154::INFO::[filesystem:571] Traceback:
Traceback (most recent call last):


So what's happening now that all the folders within TV have been deleted (along with 10 years of downloaded shows I wanted to keep) the only folders I'm left with are the ones which have been recreated by sabnzbd after receiving instruction from Sonarr to download watched folders.
The annoying thing is that my synology Nas had a recycle bin set up for retrieving any deleted content, but that too was gone.

Image

This is what I'm left with

Image

Also the annoying thing is that I'm still getting some releases that will not move into the series folder and instead sit in the root of /TV

2021-06-18 10:20:01,705::INFO::[postproc:379] Starting Post-Processing on Star.Wars.The.Bad.Batch.S01E08.MULTi.1080p.WEB.H264-STRINGERBELL => Repair:True, Unpack:True, Delete:True, Script:None, Cat:tv
2021-06-18 10:20:01,707::INFO::[notifier:122] Sending notification: Post-processing - Star.Wars.The.Bad.Batch.S01E08.MULTi.1080p.WEB.H264-STRINGERBELL (type=pp, job_cat=tv)
2021-06-18 10:20:01,708::INFO::[postproc:736] Starting verification and repair of Star.Wars.The.Bad.Batch.S01E08.MULTi.1080p.WEB.H264-STRINGERBELL
2021-06-18 10:20:01,708::INFO::[__init__:924] [N/A] /downloads/sabnzbd/incomplete/Star.Wars.The.Bad.Batch.S01E08.MULTi.1080p.WEB.H264-STRINGERBELL/__ADMIN__/__verified__ missing
2021-06-18 10:20:01,709::INFO::[postproc:756] Running verification and repair on set 5441f84720ca627fae696ece67644a04
2021-06-18 10:20:01,709::INFO::[newsunpack:1111] Quick-check for 5441f84720ca627fae696ece67644a04 is OK, skipping repair
2021-06-18 10:20:01,711::INFO::[postproc:811] Verification and repair finished for Star.Wars.The.Bad.Batch.S01E08.MULTi.1080p.WEB.H264-STRINGERBELL
2021-06-18 10:20:01,712::INFO::[filesystem:300] Checking if any resulting filenames need to be sanitized
2021-06-18 10:20:01,714::INFO::[postproc:431] Running unpack_magic on Star.Wars.The.Bad.Batch.S01E08.MULTi.1080p.WEB.H264-STRINGERBELL
2021-06-18 10:20:01,716::INFO::[newsunpack:261] Unrar starting on /downloads/sabnzbd/incomplete/Star.Wars.The.Bad.Batch.S01E08.MULTi.1080p.WEB.H264-STRINGERBELL
2021-06-18 10:20:01,781::INFO::[directunpacker:305] DirectUnpacked volume 13 for 5441f84720ca627fae696ece67644a04
2021-06-18 10:20:01,787::INFO::[directunpacker:233] DirectUnpack completed for 5441f84720ca627fae696ece67644a04
2021-06-18 10:20:03,718::INFO::[newsunpack:523] Set 5441f84720ca627fae696ece67644a04 completed by DirectUnpack
2021-06-18 10:20:03,962::INFO::[newsunpack:265] Unrar finished on /downloads/sabnzbd/incomplete/Star.Wars.The.Bad.Batch.S01E08.MULTi.1080p.WEB.H264-STRINGERBELL
2021-06-18 10:20:03,963::INFO::[postproc:435] Unpacked files ['/tv/_UNPACK_Star.Wars.The.Bad.Batch.S01E08.MULTi.1080p.WEB.H264-STRINGERBELL/5441f84720ca627fae696ece67644a04.mkv']
2021-06-18 10:20:03,963::INFO::[filesystem:300] Checking if any resulting filenames need to be sanitized
2021-06-18 10:20:03,963::INFO::[postproc:439] Finished unpack_magic on Star.Wars.The.Bad.Batch.S01E08.MULTi.1080p.WEB.H264-STRINGERBELL
2021-06-18 10:20:03,966::INFO::[nzbstuff:1827] [N/A] Purging data for job Star.Wars.The.Bad.Batch.S01E08.MULTi.1080p.WEB.H264-STRINGERBELL (delete_all_data=True)
2021-06-18 10:20:03,970::INFO::[notifier:122] Sending notification: Download Completed - Star.Wars.The.Bad.Batch.S01E08.MULTi.1080p.WEB.H264-STRINGERBELL (type=complete, job_cat=tv)
2021-06-18 10:20:04,179::INFO::[database:293] Added job Star.Wars.The.Bad.Batch.S01E08.MULTi.1080p.WEB.H264-STRINGERBELL to history
2021-06-18 10:20:04,180::INFO::[postproc:134] Saving postproc queue
2021-06-18 10:20:04,181::INFO::[downloader:399] Post-processing finished, resuming download
2021-06-18 10:20:08,181::INFO::[nzbqueue:233] Saving queue
2021-06-18 10:20:08,183::INFO::[postproc:134] Saving postproc queue
2021-06-18 10:20:08,184::INFO::[notifier:122] Sending notification: SABnzbd - Queue finished (type=queue_done, job_cat=None)

So I guess what I'm asking is for reassurance that this is not going to happen again and if there is anything obvious for the folder being emptied out. Luckily enough I have a hyper backup running on a USB drive so I'm in the process of restoring 1.4tb of data, so fingers crossed my TV folders will be restored.
User avatar
sander
Release Testers
Release Testers
Posts: 8812
Joined: January 22nd, 2008, 2:22 pm

Re: Did Sabnzbd just wipe my entire TV folder contents?

Post by sander »

So looking at the Sabnzbd logs I saw this and figured what happened is that a folder called /tv was created after downloading the test download and because there was already a folder called /tv which contained all the different tv series folders it just wiped it...Maybe?
That is not how SABnzbd nor operating systems work. Proof:

Code: Select all

sander@witte2004:~$ ll tv
total 204824
drwxrwxr-x   2 sander sander      4096 jun 18 16:00 ./
drwxr-xr-x 137 sander sander     12288 jun 18 16:00 ../
-rw-rw-r--   1 sander sander 104857600 jun 18 16:00 file1.bin
-rw-rw-r--   1 sander sander 104857600 jun 18 16:00 file2.bin
sander@witte2004:~$ mkdir tv #### here we try create the existing againg
mkdir: cannot create directory ‘tv’: File exists


sander@witte2004:~$ ll tv
total 204824
drwxrwxr-x   2 sander sander      4096 jun 18 16:00 ./
drwxr-xr-x 137 sander sander     12288 jun 18 16:00 ../
-rw-rw-r--   1 sander sander 104857600 jun 18 16:00 file1.bin
-rw-rw-r--   1 sander sander 104857600 jun 18 16:00 file2.bin
sander@witte2004:~$ 
... so contents are still there. Which proves trying to recreate an existing directory does not wipe it.


But you use "/tv". So that is in the docker. How did you expose the directory to the outside world?
mach1ne
Newbie
Newbie
Posts: 11
Joined: September 5th, 2013, 3:42 pm

Re: Did Sabnzbd just wipe my entire TV folder contents?

Post by mach1ne »

Thanks for checking that test above regarding folder creating does NOT delete an existing folder with the same name. Is this what you are asking?
Image
User avatar
sander
Release Testers
Release Testers
Posts: 8812
Joined: January 22nd, 2008, 2:22 pm

Re: Did Sabnzbd just wipe my entire TV folder contents?

Post by sander »

Indeed, that is what I meant to show.

The screenshot ... that is the docker path mapping? With left the host directories, and on the right the directories within the docker?

As other programs are accessing the tv directory ... did you check which other programs access (deleted) the tv directory / contents?
mach1ne
Newbie
Newbie
Posts: 11
Joined: September 5th, 2013, 3:42 pm

Re: Did Sabnzbd just wipe my entire TV folder contents?

Post by mach1ne »

My NAS has an admin account and a user account which is set up for sonarr, radar, rutorrent (I only use rutorrent manually when I want to find hard to obtain episodes) these have read/write access to the /TV folder...other than that I don't think anything else has.
I was doing this at 2.30am in the morning and I was changing some folder settings in my docker containers to match what was suggested in this guide,
https://drfrankenstein.co.uk/2021/05/03 ... nology-nas
but when I changed it to the suggested syntax I could not get sabnzbd to move the files anywhere...
mach1ne
Newbie
Newbie
Posts: 11
Joined: September 5th, 2013, 3:42 pm

Re: Did Sabnzbd just wipe my entire TV folder contents?

Post by mach1ne »

Well, I managed to retrieve 80% of the lost tv shows as the backup was a little out of date. I took the opportunity to blow away all my docker containers on my synology and started again from scratch using the excellent guides by https://trash-guides.info/ the new setup is running like a dream now and it's using the Hardlinks system.
Post Reply