Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Remove directory script

Featured Replies

Every day at 03:00, Kodi runs a backup and saves the folder to an unRAID server. yyyymmdd0300 is the name, with the date changing for every new backup. I just deleted 201605260300, leaving 201605270300 as the only directory. Currently, I'm just opening a PuTTY window and running 'rm -rf dirname' every morning. It's about 5gb and ~70,000 files, so Windows take a LONG time to delete across the network when using Total Commander.

 

I'd like to automate this process, taking great care to leave today's backup but deleting the yesterday's files.

 

Saving location: mnt/user/Backup but I should probably make it's own share so nothing else goes there. I've looked at a few scripts, but they haven't accounted for a dir name that changes. At least the scripts I've found...

a quick script to run after the backup

 

#!/bin/bash

YESTERDAY=`date +%Y%m%d --date yesterday`
BACKUPDIR=/mnt/usr/Backup
BACKUP=${BACKUPDIR}/${YESTERDAY}0300

rm -fr ${BACKUP}

 

of course i'd try it first with 'ls' in place of the 'rm -fr' :D

 

  • Author

a quick script to run after the backup

 

#!/bin/bash

YESTERDAY=`date +%Y%m%d --date yesterday`
BACKUPDIR=/mnt/usr/Backup
BACKUP=${BACKUPDIR}/${YESTERDAY}0300

rm -fr ${BACKUP}

 

of course i'd try it first with 'ls' in place of the 'rm -fr' :D

 

 

Thanks, ken-ji. I'll give it a try.

Back when I used Kodi/XBMC I used an add-on that handled backing up the library to a share on my server for me. It had options to set how many backup copies you wanted to keep and it would delete anything older above that set threshold automatically. I don't remember exactly what the name was but I found it in the built in list of available add-one.

Archived

This topic is now archived and is closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.