coblck Posted February 24, 2021 Share Posted February 24, 2021 @Cpt. Chaz Hi following our discussion on youe excellent script for plex back up wonder if you can have a quick look at my script see if anything pops out plec backup script.txt Quote Link to comment
Cpt. Chaz Posted February 24, 2021 Share Posted February 24, 2021 (edited) Hi again @coblck , happy to help. it looks like your script has quotes around the mtime entry that shouldn't be there. here is how it should look instead: #ENTER NUMERIC VALUE OF DAYS AFTER "-MTIME +" find $pdest* -mtime +1 -exec rm -rfd {} \; try that and see how it does. If it still doesn't remove the old backups, post a copy of the logs and lets take a look at that. on the user script page, look towards the right and you should see an icon on the line of your script that you can click to view the log for that script Keep me posted Edited February 24, 2021 by Cpt. Chaz typo Quote Link to comment
Cpt. Chaz Posted February 24, 2021 Share Posted February 24, 2021 (edited) Actually, I think your problem may be an error in the syntax from the script. I checked my logs and it was reporting a similar error. in addition to removing the quotes you added to mtime, try taking out the asterisk so it looks like this #ENTER NUMERIC VALUE OF DAYS AFTER "-MTIME +" find $pdest -mtime +1 -exec rm -rfd {} \; This seemed to fix it for me. If that also fixes it for you, i'll publish a correction. thanks for your input on this! Edited February 24, 2021 by Cpt. Chaz Quote Link to comment
coblck Posted February 25, 2021 Author Share Posted February 25, 2021 Good morning mate here is a copy of log and script still seeing undleted files in backup folder Log.txt Script.txt Quote Link to comment
Cpt. Chaz Posted February 25, 2021 Share Posted February 25, 2021 ok, starting to suspect something else may be going on with your system. copy and pasting your script line into my terminal (just adjusting paths) on two different servers of mine works the way it should. try typing this into a terminal window: find /mnt/user/Backup/Plex/ -mtime +1 -exec rm -rfdv {} \; If there's no visible errors in the terminal, check the plex backup folder and see if older files were removed, then report back with your findings. however, you may get an output in the terminal, showing a similar error to what's in your logs like find: unknown predicate `-mtime +1' (this is what i'm expecting). The source of this problem may also help explain why your gui notification is not working at the end too, as your script line for this works for me but it's obviously not working for you. Then: If you do get an error, let's try the following - install the nerd pack plugin from Community Applications if you don't already have it. Once this is installed, open it up and make sure you have the following items "turned on": ncurses-terminfo-6.1.20191130-x86_64-1.txz perl-5.32.0-x86_64-1.txz Once that's turned on, reboot the server and try running the command above and see if anything changes. If you still get an error after enabling this, post back here the terminal output of the error. At that point we'll need to call in some bigger guns to help us figure out whats going on with your server. Quote Link to comment
coblck Posted February 25, 2021 Author Share Posted February 25, 2021 Hi mate thanks for your reply very much appreciated, typed in terminal with +1 and nothing deleted but no errors, i changed to +0 and deleted folder see below Quote Link to comment
coblck Posted February 25, 2021 Author Share Posted February 25, 2021 (edited) ive now lost the option buttons for the logs in user scripts page Edited February 25, 2021 by coblck Quote Link to comment
Cpt. Chaz Posted February 25, 2021 Share Posted February 25, 2021 the user scripts logs don't persist after a reboot, so that's ok. i was about to suggest taking this over to the user script forum, but it look's like you're already there. i think a better post there would be to ask about why the bottom lines in the script aren't working on your server. they're basic linux commands, and the syntax works perfectly for me on my servers so after our troubleshooting i'm stumped as to why they're not working for you. when you make your post there, you can link to this topic for context to users that may be able to help. you may also want to post your script and logs there directly, too. i'll be following and keeping up with what's going on. 1 Quote Link to comment
coblck Posted February 25, 2021 Author Share Posted February 25, 2021 Ok will do thanks very much will the log buttons reappear ?? 1 Quote Link to comment
Cpt. Chaz Posted February 25, 2021 Share Posted February 25, 2021 they sure will! once your scripts run again, there will be a log entry. 2 Quote Link to comment
coblck Posted February 25, 2021 Author Share Posted February 25, 2021 OK many thanks will ask for some help over in the other forum. Main thing is that it's backed up. I'm going to be moving my plex folder to a new nvme drive tomorrow on unassigned devices so hopefully go ok. Thanks again and please keep up good work on you tube considering becoming a patreon 2 Quote Link to comment
Cpt. Chaz Posted February 25, 2021 Share Posted February 25, 2021 (edited) cool deal, hope all goes well. i'll keep an eye on the user script forum, and see what others have to say as well. feel free to reach back out with anything else. cheers! Edited February 26, 2021 by Cpt. Chaz 2 Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.