Automatically Purge Backup Files Off Thumb Drive
Hello, we have a thumb drive attached to a CentOS box and mysql backups are automatically saved to the thumb drive. Is there a way to automatically purge backup files if they are older than say 15 days? I suppose I would need to write a script for this.
The format of the mysql dump files are: Backup_20070420_0015.sql Thanks for the help. |
Code:
find /mnt/thumb -mtime +15 -iname Backup\*.sql -exec rm -rf {} \; |
Ok, so do I just put that in a file, which is rwxr-x-r-x and then add to the cronmanager?
|
Also, do I need to define what shell I want to use?
|
You could make it in to a cron script if you like.
Something as simple as this would work: Code:
#!/bin/bash Code:
#!/bin/bash |
All times are GMT -5. The time now is 12:11 PM. |