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.
To export your schedule:
- Launch Power Manager.app;
- Select the menu item File > Export Schedule…;
- 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.
- Launch Power Manager.app;
- Select the menu item File > Import Schedule…;
- Choose the schedule file and Import.
Backup from the Command Line
You can use the command line tool pmctl to backup your schedule.
- Launch Terminal.app;
Change to the
Toolsfolder with the command:
cd '/Applications/Power Manager.app/Contents/Tools'
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
Power Manager stores your schedule using OS X's
defaults mechanism; we use the identifier
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
Power Manager's pmd preferences are stored in
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.
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.