cleanup.sh 560 B

1234567891011121314151617
  1. #!/bin/bash
  2. #########################################################
  3. # #
  4. # Supprime les sauvegardes vieilles de plus de 10 jours #
  5. # #
  6. #########################################################
  7. # Parametrage
  8. WWW_BACKUP_DIRECTORY=/home/backup/www
  9. MYSQL_BACKUP_DIRECTORY=/home/backup/mysql
  10. # Fichiers
  11. find $WWW_BACKUP_DIRECTORY -maxdepth 1 -mindepth 1 -mtime +9 -exec rm -rf {} \;
  12. # Dumps mysql
  13. find $MYSQL_BACKUP_DIRECTORY -type f -mtime +9 -delete