Database Backup Strategies For Daylite Server
Quick Tips June 26, 2012 mives
It’s important to take the time to absolutely, positively make sure that BACKUPS are enabled and working properly for one of your most critical business assets! It’s essential that you have a backup copy of your latest Daylite Backup Snapshot (.dlbackup).
Losing your primary customer database could easily be enough to put you out of business. To have a completely reliable and automated backup system you should make sure your Daylite Server has each of the following four things setup:
1) Make sure Daylite Server Admin has Backup Snapshots turned on and functioning properly.
Even though you might have Time Machine running already, Time Machine was not designed to backup databases (such as Postgres which is used by Daylite Server, MySQL, Oracle, etc.) while they are in use. You need to make sure Daylite Server Admin is configured to automatically create backup snapshots on your internal server drive.
- Go to your Daylite Server Admin (in your Applications folder) on your dedicated Daylite Server desktop Mac.
- Switch to the backup tab and make sure the checkbox next to your Database is checked.
- If it is not, unlock Daylite Server Admin by clicking the lock icon in the lower left and authenticating. Check off all databases you want to have backed up.
Scheduling: How often do I need to backup my database?
Unless you have an abnormally large database, choose a backup schedule of “Everyday” and select a time of day during your off-hours. (In addition, manually backing up the database is good practice prior to performing a software update, importing data or doing any type of database maintenance.)
Location: Where do my backup files go?
By default, Daylite Server is setup to place your snapshots into YourHardDrive/Users/Shared/Daylite Server Backups. The backup files that are created will include the database name, and a date/time stamp so that you can easily identify when the backup was created.
Again, it’s essential to have Daylite Server Admin create your Backup snapshots (.dlbackup files) which also verifies your data and creates a running history of your backups) so they can be backed up properly by Time Machine or another automated backup system. You’ll only be able to restore your database in case of a hardware failure from a .dlbackup file.
2) Set up Time Machine, SuperDuper! or a cloud based service to backup those (.dlbackup) files.
Now that you’ve got Daylite Server Admin creating regular backup snapshots, you need to have those backup files copied to another storage medium (external hard drive, Time Capsule or internet based storage) using an automated system. Time Machine is a great option for backing up your Mac because it’s so easy to initially configure. If you’re using nothing currently, definitely enable it on a simple USB backup drive as it’s better than nothing. However it lacks features needed to control how much space your Daylite backups will take up on the drive so be sure to make sure you’ve bought a big enough drive to hold all these daily backup files plus the entire contents of your server Mac.
You must assume your drives could fail at literally any moment; hardware failure, incorrect software update procedures, or human error can and probably will happen to you at some point. Everyone should have a complete backup at any given moment of their critical business files and particularly your sales database. And “at any given moment” means it needs to be automated otherwise you just won’t remember to do it as often as you should.
3) Create an archive copy of your Daylite database on a completely different backup medium in case your primary backups are destroyed by natural disaster.
If you use an online backup medium, keep a second backup on a USB thumb drive and store it off-site. If you use a physical on-site backup, put an archive copy on a secure off-site server or cloud storage provider on a regular, but less frequent schedule. Many people use the daylight savings time change (excuse the pun) as their reminder to change their online passwords. If you can’t automate this process completely, perhaps make these two times a year a chance to create an off-site backup if you don’t already have one. You may want to have a more frequent archive period, depending on your business needs.
4) Make sure you have still have enough space on your backup drive to last until your next archive time.
Take the time now to check how much space you have on your Server’s internal and backup drives.
- In the Finder (Lion shown), click on Macintosh HD in the sidebar under Devices.
- Select Get Info from the File Menu (or View>Show Status Bar) and note the amount of space available.
- Navigate to /Users/Shared/Daylite Server Backup folder and switch to list view and sort by Date Modified to select your latest backup. Note the size of the .dlbackup file (choose File>Get Info if you’re not in list view).
You should have enough space on your drive to hold daily backups for the last 3-6 months or as at least as long as your time between archives. If you don’t have enough space, you’ll have to make your archive period shorter and create an off-site archive more frequently. You could also trim old backup files to save space, or buy a larger backup HD.
How do I trim older backup files?
1) You can either manually remove backups older than your archived off-site .dlbackup when you are periodically creating those archives if doing so manually. In List view, sort by Date Modified and select all files older than your archive period.
2) Or you can automate removing old backups using a great utility called Hazel, which lets you filter files and perform actions on any folder in the filesystem. You can use a rule like this to remove backup files older than [X time period], but please adjust them based on your archive period you chose up in Step 3:
(Big Legal Disclaimer™: Hazel is not our product and so if it chews up any data because of a one in a million bug, please don’t blame us. We’ve seen it working great for many of our customers and the guys at Noodlesoft seem cool too, so we wanted to share it with you. Please make sure you have double redundant backups before implementing any sort of automated scripts that remove data from your system.)
What to do if my Database seems too big?
Each time a Daylite database backup is created, the entire database is backed up, including all file attachments to emails recorded with Daylite Mail Integration (DMI). If you think that large email attachments might be contributing to your database size, you can strip or archive attachments by running the Attachment Archiver inside Daylite Server. This will speed up both backup time, and the time needed to initially add new users or devices to your database.
Daylite Server Backup Best Practices
Whether you are a company of one or one hundred and one, you must set a policy for managing and maintaining your database and server backups. We would highly recommend you make sure you are doing all four things mentioned. And to regularly double-check your system to ensure that backups are being created and managed correctly by the system. Time spent today will save you a ton of time AND headaches *when* your system decides to fail on you.
If anything here is unclear, contact us for help.