Copy latest backup, delete old backup

Get help. Get answers. Let others lend you a hand.

Moderator: Mr_Noodle

Copy latest backup, delete old backup Tue Jun 27, 2023 1:38 pm • by bayon
I have a piece of medical software that creates nightly backups, but the backsups have gotten so big that it is introducing some new problems in the way we used to manage things, so I am redoing everything.

What I would like to do is have Hazel copy the latest nightly backup to a folder on the desktop, and our backup software will only grab that folder. I also need Hazel to delete whatever backup was in that folder the night before, leaving me with one backup at any given time. The backups file that the software produces is a different name each time.

Currently I have a rule that is set to Date Added is Today, copy to Backups folder. This appears to be working well. What's the best rule to safely purge that folder of any old today and only leave the latest backup?
bayon
 
Posts: 18
Joined: Sun Oct 09, 2016 9:42 pm

Re: Copy latest backup, delete old backup Wed Jun 28, 2023 10:59 am • by Mr_Noodle
You can try "Date added is not among the X most recent" to match everything but the X most recent backups.
Mr_Noodle
Site Admin
 
Posts: 11255
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Re: Copy latest backup, delete old backup Wed Jun 28, 2023 1:19 pm • by bayon
Thank you, I will give that a shot.
bayon
 
Posts: 18
Joined: Sun Oct 09, 2016 9:42 pm


Return to Support