Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

OCDMacGeek

macrumors 6502a
Original poster
Jul 19, 2007
581
80
I have a smaller SSD drive in my Mac Pro. I have other disks, but I like the small SSD as my main drive. I have a program (Daylite) that needs to backup its database every day. The program refuses to save these backups anywhere except the main drive. Therefore, my SSD fills up quickly and when I forget the delete old backups, my drive gets full and the system stops.

I need to be able to automatically delete older files from that folder when my drive is getting full. For instance, I could have any files older than 3 days be deleted from that folder whenever the disk is low.

Anyone know of an app for this?

Thanks.
 
I have a smaller SSD drive in my Mac Pro. ...
This is so wrong on so many levels:
  1. You should not use your main drive as a backup. All you are doing is duplicating your files.
  2. You should not hold you needs hostage to your software. If Daylite only allows you to backup to your main drive, then replace it with software that allows you to do real backups. Carbon Copy Cloner is free.
  3. You want to automatically delete files when capacity is low? Huh?!! The purpose of backup software is to save your data, not delete it. You inadvertently delete a primary critical file four days after backup and one day after your backup has been deleted. Where are you then?
There are many backup/synchronize utilities available for the Mac. In virtually every case, you will do better than you are doing now.
 
It could be done with a bash script using the find command making use of the ctime (or maybe mtime or atime ; c=created, m=modified, a=accessed-last). I use the command for finding recently modified/created files. Once you had the script it could be run automatically via cron. The trick will be writing the bash script, which could potentially be a single line command. I can't give a solution off-hand because there's too many unknowns about the exact setup. You can likely find a solution on-line though.

Example usage:
Find all files modified in last minute starting from the current directory (given as .).
Code:
find . -mtime -1m
Same, but will delete everything it finds. I don't recommend running this casually. Use the above first to make sure it doesn't find anything you don't want deleted.
Code:
find . -mtime -1m -delete
Find items created more than 1 year ago.
Code:
find . -ctime +365d
 
Wouldn't that run the risk of deleting important files, like system files, etc. That seems EXTREMELY risky to me.

Why not just use Time Machine or some other back-up software. Anything that backs up your entire hard drive will back-up the Daylite database as well. And these solutions automatically delete older files when the space is needed.

However, according to the Daylite website you can specify a different location for the backup however so this should all be unnecessary.

http://www.marketcircle.com/kb/idx/0/636/article/
 
Some of these responses haven't really been on point. Daylite isn't backup software. It's a project database program, and it has a built in backup solution to make backups of its Postgres-based database. Time machine backups dont work for whatever reason, as the developer takes great pains to note. While the software is supposed to let one choose where to place backup files, it has never worked. Anytime I select a folder on anything except my main drive I get an error.

I don't know how to use Automator, unfortunately. Just had a new baby boy on Monday, no time to learn!

This wouldn't be very risky as I'm planning it, because I would keep several days on backups. I would only automatically delete obsolete backups that are a week old.

Any ideas that could help?
 
Some of these responses haven't really been on point. Daylite isn't backup software. It's a project database program, and it has a built in backup solution to make backups of its Postgres-based database. Time machine backups dont work for whatever reason, as the developer takes great pains to note. While the software is supposed to let one choose where to place backup files, it has never worked. Anytime I select a folder on anything except my main drive I get an error.

I don't know how to use Automator, unfortunately. Just had a new baby boy on Monday, no time to learn!

This wouldn't be very risky as I'm planning it, because I would keep several days on backups. I would only automatically delete obsolete backups that are a week old.

Any ideas that could help?
You can choose an external drive to backup your database. I have this on my own setup and it has worked flawlessly. If you're getting an error message, it could be that the location you are selecting is not accessible by the Daylite user on your machine. Check permissions.

Your comment about not being able to use Time Machine is incorrect but it is a common misconception. I'll explain. Because your Daylite database file is considered to be an 'open file' you cannot use Time Machine to back that file up directly.

However you can and should use Time Machine to backup your Daylite database BACKUPS.

As mentioned by another post, Hazel is a popular tool for deleting older Daylite Backup files.
 
You can choose an external drive to backup your database. I have this on my own setup and it has worked flawlessly. If you're getting an error message, it could be that the location you are selecting is not accessible by the Daylite user on your machine. Check permissions.

Your comment about not being able to use Time Machine is incorrect but it is a common misconception. I'll explain. Because your Daylite database file is considered to be an 'open file' you cannot use Time Machine to back that file up directly.

However you can and should use Time Machine to backup your Daylite database BACKUPS.

As mentioned by another post, Hazel is a popular tool for deleting older Daylite Backup files.

Thanks Steve and other posters, I appreciate it. I must have some permissions issues, but Hazel works like a charm.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.