How to Backup Power Manager

When disaster strikes, having a backup of your work is critical. Here is how to backup your Power Manager schedule.

Having a backup of your work is important. Many hours can be spent building and refining the perfect Power Manager schedule. In this recipe, we will look at how to backup your schedule and avoid problems when a storage device eventually fails.

Export Your Schedule

The Power Manager application includes a menu item to export your schedule. The resulting file contains a complete copy of your schedule and events. This is a simple file and can be e-mailed, copied to remote services, and stored on non-Mac computers without risk.

Screenshot showing Power Manager’s Export Schedule menu item

To export your schedule:

  1. Launch Power Manager.app;
  2. Select the menu item File > Export Schedule…;
  3. Choose a suitable location to keep the file and Export.

The exported file should be backed up safely. Do this by storing the file on another storage device, computer, or remote backup service.

Restoring a Schedule

A backup is only useful if it can be restored. Power Manager makes restoring previously exported schedules easy.

  1. Launch Power Manager.app;
  2. Select the menu item File > Import Schedule…;
  3. Choose the schedule file and Import.

Backup from the Command Line

You can use the command line tool pmctl to backup your schedule.

  1. Launch Terminal.app;

  2. Change to the Tools folder with the command:

     cd '/Applications/Power Manager.app/Contents/Tools'
    
  3. Pipe your schedule to a file:

     ./pmctl -f xml eventstore.events > ~/Desktop/my-schedule.pm-schedule
    

Under the Hood

It can be useful to understand when and how Power Manager stores your schedule. Unlike most applications, Power Manager runs across multiple users and therefore does not store files in the traditional ~/Documents or ~/Library folders.

Power Manager stores your schedule using OS X’s defaults mechanism; we use the identifier uk.co.dssw.powermanager.pmd and host wide for the domain. This delegates the storage choices to OS X.

As of OS X 10.10, Yosemite, Apple’s engineers choose to store the defaults within Preferences folders in the form of property list files, plist. For host wide defaults, such as Power Manager’s, the folder is /Library/Preferences.

Power Manager’s pmd preferences are stored in /Library/Preferences/uk.co.dssw.powermanager.pmd.plist.

Do not directly edit the uk.co.dssw.powermanager.pmd.plist file. Changes made to the file will not affect Power Manager. Instead use an application programmer interface (API) to make changes to a running instance of Power Manager.

Power Manager reads the defaults once upon launch. As the internal state within Power Manager changes, the defaults are updated. Power Manager will overwrite changes made by other tools and processes.

Backup Regularly

Be sure to backup your files and work regularly. All storage devices will fail at some point. When a device does fail, it is important to know your work is safe and can be easily restored.

If you have suffered a device failing and do not have an exported schedule available, but do have a full computer backup – such as Time Machine, get in touch. We may be able help get your schedule and settings back.