(Elementary user)
I have SQL backup files that are saved every weekday to a specific path.
Before the tape backup executes, the following script is used to remove the backup from the previous day.
This is fine for Tuesday - Friday, however on Monday, if I have understood correctly, the -mtime flag needs to be +3 in order to delete Friday's backup from the previous week.
Here is my script:
find /my/path/SQL_Backups/ \( -name '*.bak' -o -name '*.txt' \) -mtime +1 -exec rm {} \;
Can anyone please help me in making this script applicable to all weekdays, i.e., a modification date '> 1'.
Best regards
I have SQL backup files that are saved every weekday to a specific path.
Before the tape backup executes, the following script is used to remove the backup from the previous day.
This is fine for Tuesday - Friday, however on Monday, if I have understood correctly, the -mtime flag needs to be +3 in order to delete Friday's backup from the previous week.
Here is my script:
find /my/path/SQL_Backups/ \( -name '*.bak' -o -name '*.txt' \) -mtime +1 -exec rm {} \;
Can anyone please help me in making this script applicable to all weekdays, i.e., a modification date '> 1'.
Best regards