How to Backup and Restore Hook Data

There are several ways to backup Hook data and restore it on the same or different Macs.

Some rules:

  1. Make sure that the Mac to which you are restoring Hook’s Application Support folder (~/Library/Application\ Support/com.cogsciapps.hook) uses a version of Hook that is the same or newer than the source Mac.
  2. Before backing up or restoring Hook’s Application Support folder, exit Hook on the Mac(s).
  3. Ensure that Hook’s Application Support folder (~/Library/Application\ Support/com.cogsciapps.hook) is migrated in its entirety in a way that preserves its files’ macOS Finder extended file attributes (xattr). The methods described below achieve this.

The most common ways of backing up and restoring Hook data are:

These methods are described below.

Where does Hook store its data?

First, consider where Hook data is stored.

  1. Hook stores its bookmarks and link in the ~/Library/Application\ Support/com.cogsciapps.hook folder.
  2. Hook also has a preferences file: ~/Library/Preferences/com.cogsciapps.hook.plist.
  3. Hook also creates a ~/Documents/Hook folder, which contains Hook templates and notes created with Hook.
  4. At your request, Hook can create .hook files, which by default are stored in the ~/Documents/Hook/Hook Files folder. You can move Hook files wherever you want.

Time Machine and Migration Assistant

If you enable Time Machine on the source Mac, then you can restore a previous version of Hook’s data in the way you would with any other app. Similarly, you can use Migration Assistant as you would with any other app. You can then restore your data on the same Mac or a different Mac.

Clone or ditto

You may alternatively backup and restore Hook data by using cloning software, such as Carbon Copy Cloner or Super Duper. You may also use ditto from the command line to backup and restore Hook data.

Zipping and unzipping Hook’s library folder

You may also zip the content of Hook’s ~/Library/Application\ Support/com.cogsciapps.hook. To restore Hook on the same or a different Mac, unzip this folder on the target machine.

Accessing link targets after restoring from a backup

When you use Copy Link on an item, Hook returns a link containing a URL (an address). Often, the URL of the file will match the app’s “scheme”. For example, in OmniFocus you get OmniFocus:/// URLs. In web browsers you often get https://`. On Finder files, Hook typically copies a URL of the formhook://file//`. They are known as “Hook file-URLs” or “Hook file-links”. Their targets can be any files. (Not to be confused with “.hook” files.)

After you restore your Hook data, in order for Hook (or any other app) to be able to reach the target of any link, its target must be reachable from the target Mac. For example, if you have links to OmniFocus tasks, those links will only be reachable if OmniFocus is installed on the target Mac and the same OmniFocus database is available there too. So you will need to restore those targets, too, if you want to continue to be able to access them with Hook.

Similarly, if pre-backup, you created links to files (hook://file//), those files must still be accessible for the links to be used. If the files are remounted in the same location as they were when you last used Hook, then Hook will point to them at that location.

If you happen to not remount the target files in the original location (path) and mount them at a different location instead, then Hook will attempt to find the targets of your links elsewhere. (This is part of what we mean when we say that Hook links are robust.) If in this case you have multiple copies of the target Hook files, Hook will only choose one target per link. (If that target disappears, Hook will attempt to re-anchor the link.)

See also

See also

Hook Productivity App Newsletter

Sign-up to receive emails about Hook productivity app. Our emails sometimes include coupons for discounts on great Hook-linkable apps made by other developers.

 Marketing permission: I give my consent to to be in touch with me via email using the information I have provided in this form for the purpose of news, updates and marketing.

What to expect: If you wish to withdraw your consent and stop hearing from us, simply click the unsubscribe link at the bottom of every email we send or contact us at We value and respect your personal data and privacy. To view our privacy policy, please visit our website. By submitting this form, you agree that we may process your information in accordance with these terms.