Product
Support
Everything Else
A Note About Backups
Introduction

When choosing a location for backups, it is important to choose a folder other than the one in which your active collection is found. HMM does not consider this an error, but it does open the door for a potentially devasting accident.

‘Delete Backups After’ Problem

The danger with keeping backups in the same location as the active collection is related to the Delete Backup Collections After… setting. It is possible to set this to "after 0 days," which HMM interprets as "every backup except the most recent one."

HMM's interpretation of what constitutes a backup is anything in the folder specified as the location for backups. When it is time to delete old backups, HMM simply examines the "modified" date stamp of every file in the backup folder, and deletes items that are older than the threshold you have specified. There is potential here for HMM to consider your current collection as a backup (after all, it is in the backups folder) and delete it.

Luckily "deleting" really means "moving to the trash" so unless you specifically empty the trash the collection is still intact on the hard drive, albeit in a very dangerous place.

Adding another layer of confusion to the situation is the fact that macOS will allow Helix Server to reopen the collection even if it is in the trash. This will not result in any damage to the collection, but HMM expects to find the collection in a specific location, and it won't be there the next time HMM runs, causing further errors to crop up.

Solution

Be sure that HMM is set to store backups in a location other than the folder where the active collection is found. We recommend creating a folder specifically for these backups so they are not mingled with other files.

Deleting Old Backups That Have Been Moved to the Trash

Becuase Helix Maintenance Manager does not explicity empty the trash, care must be taken to make sure the hard drive does not become full with old copies of your collection. A simple script that empties the trash can be created to do this. Here is one version, tested in macOS 10.4.6.

  on open
    tell application "Finder"
      tell trash
        set warningStatus to (warns before emptying) -- preserve the normal setting
        set (warns before emptying) to false -- avoid dialogs when script runs
      end tell
      empty trash -- actually do the deed
      tell trash
        set (warns before emptying) to warningStatus -- put it back the way it was
      end tell
    end tell
  end

To create this script application, copy the code above, then launch Script Editor and paste it into a new document. Save this as an application. You can also download this script from our FTP Server.

HMM offers many places to run external applications. In the case of this script, we have three obvious locations: In the Targets pane we have: Pre-Process Script, Post-Process Script, and Backup Script. In the Check Settings tab we have On Pass settings for both Update Collection and Helix Utility, and in the Notification Settings tab we have the On Success section.

Setting this as a Pre-Process or Backup script would delete files moved to the trash by the last run of HMM. This seems slightly dangerous — what if your last good backup was moved into the trash by the last run of the plan? This danger can be lessened by making sure the Delete Old Backups After setting is sufficently greater than and the interval at which you run your plan, so that you always have a few buffer copies in your Backup Location. (For example: if you set Delete Old Backups After to 1 week and your plan is only run once a week your last good backup would be in the trash, and therefore deleted before HMM detects that the current copy is damaged!)

Aside: As a Rule of Thumb, you keep at least two backups of your collection in the Backup Location folder at all times.

Putting the script in the Update Collection/Helix Utility On Pass tasks is also reasonable, but our personal recommendation is to attach this script to the On Success action in the Notification Settings panel. By attaching the script at this point only after HMM has checked the collection and found that it is undamaged will it go ahead and delete the older backups. Combine this with a setting to email a warning in the event of an error and your collection should be well protected.

Scope/Status

This potential exists in all versions of HMM.