Hi
We have a server that creates daily backups, I wrote a script that successfully deletes backups that are older than 24 hours.
However sometimes the backups don't succeed therefore a fresh 24hr backup is not available, in which case we use the most recent backup and discard the older ones.
Any ideas on if a backup has not been created in past 24hrs that the most recent backup is kept and the rest are deleted?
All advice appreciated, also the backups are of the style mentioned above hence I wish to use regular expressions to detect all files of that naming style.