I need to delete backups older than x days and I'd like it to be automatic to a point. Is there a way to clear backups on my Minecraft server?
Asked
Active
Viewed 2,556 times
1 Answers
1
You will use FIND command to do this, you will have to create a bash script and a CRON job.
Please read the man for FIND.
find /u1/database/prod/arch -type f -mtime +3 -exec rm {} \;
This command finds all the files under /u1/database/prod/arch and it's subfolders, that are "regular files" (-type f) not directories, device files or something like that, and that have been modified at least 3 days ago (-mtime +3) and then executes "rm " for those files.
LMZ
- 61
- 5