zacharyd3

Members
  • Posts

    20
  • Joined

Everything posted by zacharyd3

  1. You put your cron setup in the text box. As for the scheduled times, you can get a plugin to set the "Daily" time yourself. I'm at work at the moment so I can't remember what it's called but I'm pretty sure it's a dynamix plugin and then you get a new settings page under the scheduler to adjust it. I've got my "daily" tasks setup to run at 6:30pm everyday and it work flawlessly. Edit: Yup it's dynamix that has the scheduler
  2. Checkout this link to easily use cron: https://crontab.guru/ Edit: This is what you would want to use if you want it to run everynight at 5:45am: 45 5 * * *
  3. Actually, Disregard the code I just sent, you can actually take out one line for the media variable, as I never ended up needing it, haha. This should work just fine: #!/bin/bash debug=1 #Change this to 1 for more logging, 0 for less #Start with a clear screen clear #Set working directories output=/mnt/user/DownloadsPP/ #Change this to your handbrake output directory movies=/mnt/cache/Media/Movies/ #This should be your movies directory series=/mnt/cache/Media/TV/ #This should be your series directory #Search the output directory for new media find $output -type f | while read file do #Parse the movie name from the filename movieParsed0=$(echo "$file" | cut -d'.' -f1) movieParsed1=$(echo "$movieParsed0" | cut -d'/' -f7) #Lower or raise the number in f9 until "Movie parsed to:" shows just the movie name. if [ $debug -eq "1" ] then echo "Full filename: "$file fi #Check if the file is a movie movieFolder=$movies$movieParsed1 if [ -d "${movieFolder}" ] then if [ $debug -eq "1" ] then echo "Movie parsed to: "$movieParsed1 echo "Movie Folder: "$movieFolder fi #Move any found files #mv "${file}" "${movieFolder}"; echo $movieParsed1" Moved" #Once all the outputs look correct, remove the "#" else seriesParsed0=$(echo "$file" | cut -d'.' -f1) seriesParsed1=$(echo "$seriesParsed0" | cut -d'/' -f6) #Lower or raise the number in f8 until "Series parsed to:" shows just the movie name. seasonParsed0=$(echo "$seriesParsed0" | cut -d'/' -f7) #Change f9 to one higher than the previous line episodeParsed0=$(echo "$seriesParsed0" | cut -d'/' -f8) #Change f10 to one higher than the previous line seriesFull=$series$seriesParsed1/$seasonParsed0 if [ -d "${seriesFull}" ] then if [ $debug -eq "1" ] then echo "Series parsed to: "$seriesParsed1 echo "Season parsed to: "$seasonParsed0 echo "Series Folder: "$seriesFull fi #mv "${file}" "${seriesFull}"; echo $seriesParsed1" Moved" #Once all the outputs look correct, remove the "#" fi fi echo "" done
  4. Yea if you can get it to include the folders then it should be really easy to setup. If you can get handbrake to output the files into the original folder structure like you're saying you can easily get it to copy them back by just changing the "/downloads/" to "mnt/cache/media/" It's a tad busy at work rn but if I don't have time to set it up, I'll get a rough draft setup tonight and send it your way.
  5. Ok, so this should work specifically for movies, TV will still need some work. The only issue I see coming up is if there is a TV show episode that has a title that matches a movie name, however if your shows are stored like "/Shameless/Season 1/S01E01 - show title.mkv" then you shouldn't have to worry because the season and episode in the title will never match a movie. You'll also want to go through the code below and edit some values to match your system. I left notes on the right side as to what to change, but basically, make sure the variables match your system and then run the script and it should spit out matching files. As long as it matches and everything looks right, then remove the # on the 4th last line and it will actually move stuff. #!/bin/bash #Start with a clear screen clear #Set working directories output=/mnt/cache/Media/Output/ #Change this to your handbrake output directory media=/mnt/cache/Media/ #This should be your media directory movies=/mnt/cache/Media/Movies/ #This should be your movies directory #Search the output directory for new media for file in $output* do #Parse the movie name from the filename parsedName0=$(echo "$file" | cut -d'.' -f1) parsedName1=$(echo "$parsedName0" | cut -d'/' -f7) #Lower or raise the number in f7 until "File parsed to:" shows just the movie name. echo "File parsed to: "$parsedName1 #Check if the file is a movie movieFolder=$movies$parsedName1 if [ -d "${movieFolder}" ] then echo "Movie Folder: "$movieFolder #Move any found files #mv "${file}" "${movieFolder}"; echo "Files Moved" #Once all the outputs look correct, remove the "#" fi echo "" done
  6. See, for movies it would be easy because you can just parse the filename and move it to the matching folder, but TV makes it a bit more difficult because the episodes more than likely wont have the show name in the title. As for how to get Radarr or Sonarr to search for them, I'd look at the api and see if there is a way to make it work. I can write something up for movies to get that moved to the proper folder, but TV might take a sec. Granted, there might be someone else on here with more knowledge than I that would be able to get it done easily, haha.
  7. Ok, so I'm assuming your directories are set up something like /mnt/cache/Media/TV/Shameless/Season 1/episode goes here.mkv You would then need to parse the filename so try and figure out where it should be stored, otherwise, if you had radarr and sonarr setup then you can always just copy the files back to the download directory of either of those programs and let it import them again. If you could post your naming scheme I can see if there is any way I can think of to try to parse the file and move it to the proper folder automatically. I'm also not familiar with how Handbrake outputs the file, does it output it back into a folder like it was originally (ie. /mnt/cache/HandbrakeOutput/Shameless/Season 1/episode.mkv), or does it just spit out the file (ie. /mnt/cache/HanebrakeOutput/episode.mkv)? Obviously enough, if it spits out the whole folder it would make things exponentially easier, but if not, I'm sure we can find a way to get it done. Also, just know I'm no expert, I'm all self taught when it comes to bash and scripting but I can usually make stuff work. That being said, I am also at work so I may not reply asap but I'd be willing to help where I can 😄
  8. How is your media stored in /mnt/cache/Media/ ? is it all just thrown in the folder because if so, that will be an easy task to accomplish. All you'd need to do is change the line that says "output=/mnt/cache/output/" to wherever Handbrake outputs it's files to. This will then move any files from that directory to your media directory. #!/bin/bash #Set working directories output=/mnt/cache/output/ media=/mnt/cache/Media/ cd $output #Search the output directory for new media for file in $output* do #Move any new files from the output directory back to the storage directory mv $file $media done EDIT: I just thought of another, albeit slight issue. If Handbrake puts the file there while it's still in progress, it'll try and move incomplete files; so to get around this, I'd suggest setting this script to run on either a custom cron job or daily. This would mean a smaller chance of catching half-complete files.
  9. I just tossed a 1050Ti into my server to see if I could get this working, and after running the script (with the right container name) it doesn't seem to be working. It shows that it's encoding, but the decoding still sits at 0% and I'm not sure why. Nevermind, I seem to have found out why. It looks like this script only works on version 1.15+ and I'm just running 1.14 so I need to wait until the alpha is pushed to the main channel before it will work.
  10. Just in case someone else has this error, since I had a hard time finding any solution that wasn't just "Your SSD is dead" here is what I did to fix my situation: As johnnie.black suggested, I ensured I still had my backup of my AppData (the only thing on my cache drive) and then I shut down the array. I removed the cache from the array (not physically, just in software) Using unassigned devices, I formatted the cache completely Re-added the cache back to the array and started it up again. In my situation, I had to rebuild my docker image by re-installing all the dockers individually. I then copied all the AppData back and overwrote all the AppData that was currently there from the fresh installs. Again, this might be unique to my situation but I knew which file was corrupt because it actually caused a docker to fail, so when I copied all my files back, I left the errored file out (obviously enough, as the whole reason this was being done is to fix that corruption). It seems like it was a file that was corrupt that threw up an error that is the same as what might happen with a failing drive. I also swapped out my cache drive, just to be safe, but considering when I transferred the broken file it threw up the same error, I'm confident that it wasn't the drive with the issue, just that file. Currently, the 40Gb of Plex metadata is still transferring back but everything else that was transferred seems to have worked flawlessly. I also spent a few hours running memtest, and after a pass, it came back as fine. I'm aware that you should really run it for more than just one pass, but I wanted to start the transfer. Once everything is confirmed to be back up and running, I plan on running memtest for the whole weekend and then seeing how it fairs. Thanks for everyone here and on Reddit who helped with the solution!
  11. Yea, I really only had appdata on the cache so I have that backed up. I even changed the drive over and then restored the data and it still has that error. I'm thinking my next step is to avoid the file that I suspect is causing the issue and then restore everything but that. My main concern is that hopefully my Plex, Sonarr, and Radarr data is fine, everything else is replaceable easily. Thanks for the support!
  12. I've attached the diagnostics thor-diagnostics-20190228-2321.zip
  13. So A few days back I noticed that one of my dockers was not started as it should be. The logs showed that the config directory wasn't where it should be, which I found odd because when I went to look for it, all the files showed up as they should. I thought this was an error with an update to the docker where maybe the actual application code was looking in the wrong spot, maybe a typo or something. I left it as is and just didn't use the application for a day or two, until yesterday. I needed to reboot for something so I did, and while watching all the text fly-by I noticed that there was an error along the lines of BTRFS critical error: unable to find logical 123189231236 found 4096 (the numbers aren't exactly correct as they're off the top of my head) but I noticed anytime I enter the directory, the files are no longer there and that error pops up again. First I thought that the SSD was failing, so, no biggie, I'd just install the spare I have which is also larger. In addition, all my searching online seems to back this up, and all the documentation I can find regarding that error says it's bitrot, or something. However, when I swapped the new drive in and copied my appdata over, I continue to get that error when I'm looking for the same file. Lastly, I also goofed because I tried to open a 35gb zip file in krusader which seems to have massively inflated the size of my docker image so I thought I'd move it off the cache to the array. I followed steps to move it, and then decided to just rebuild the whole darn thing. Either way, I must have messed something up because now it shows I have 0 dockers installed, but really, I've got backups of the appdata, so that's no big deal, I'll just reinstall. I just thought I would post here, and see if anyone has any suggestions because I can now no longer delete the directory that is "corrupt" as it shows an I/O error, so I'm wondering if anyone has experienced this, or knows a solution for how to even just delete the directory? I'm at work, so I don't have access to my server to test but I thought I'd fish for suggestions here, and worst case, pull the cache, completely format it on my windows machine, and then start over, but bypass copying back the folder that I'm assuming is "corrupt",
  14. As of today I'm suddenly unable to use this. I keep getting an error "No OpenVPN config file located in /config/openvpn/ (ovpn extension), please download from your VPN provider and then restart this container, exiting..." however, nothing has changed, just overnight it has stopped working. I double checked and the config files are still there, and if I edit the docker to add a path to /config/openvpn/ directly to the files it still shows they aren't there. I'm wondering if there was an update that may have broken a link somehow?
  15. I've honestly got no clue as to why I had a /boot/ directory but copying it back ontop of a fresh install on the USB seems to have worked. Thank you so much for the support, it's been a stressful 3 hours trying to see if I lost all my media or not, but thankfully it's all there. Thanks again!
  16. Yea, the original command was "for name in *; do mv -i -- "$name" "${name#*-}" with a directory change before it, but the directory was wrong, so it just did all this on /root/
  17. Yea it's got /boot and /config I've copied both folders to a backup on my PC and am in progress of rewriting the drive. I'm thinking I only messed up a single file possibly, which could be causing my issues booting? EDIT: hmm, just looking at the newly created drive and it doesn't have /boot/ but in comparing it to the folder the old drive had, the /boot/ folder is the same as the new drive's root folder... weird. I'm going to attempt copying the whole /boot folder to the root of the drive and see if that fixes it...
  18. Thanks! Should I be copying /config/ or should I also copy /boot/config/ which seems to have all my shares and plugin data on it?
  19. Admittedly, this is my screw up, and I know it's my fault, but now I'm just looking to see how I can hopefully recover my system. I was playing around with a rename script (using mv) to change files from "S01E01 - title.mp4" to "title.mp4" by removing all the text up to the first dash. However, I forgot to surround my script in an if statement, and also seem to have made a typo in the directory, so it ran the script in the root directory. I immediately shut the server down, hoping that it wouldn't just delete my whole server (media included) and thankfully, it wasn't running recursively, that I know of at least. Now, when I boot the server it brings up the boot options menu and just loops there. "Booting in 5,4,3,2,1" and then back to 5 again. It seems like I obviously messed up the boot settings or a file but I can't get it to boot anymore. I'm pretty sure my media is still there (hopefully) but I just can't get it to boot. I've emailed unraid to see what they say, and hopefully, I can fix my boot drive and get it back up, but I'm not sure. My hope is that maybe someone smarter than myself can assist in getting my server back up and running, as I just started playing with Unraid a few months ago, and don't know much when it comes to Linux or unraid. Thanks for reading!