0

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?

Richard
  • 8,588
popcorn9499
  • 59
  • 2
  • 10

1 Answers1

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