There are several ways to backup Hookmark data and restore it on the same or different Macs.
Some rules:
- Make sure that the Mac to which you are restoring Hookmark’s
Application Support
folder (~/Library/Application Support/com.cogsciapps.hook) uses a version of Hookmark that is the same or newer than the source Mac. - Before backing up or restoring Hookmark’s
Application Support
folder, exit Hookmark on the Mac(s). - Ensure that Hookmark’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 Hookmark data are:
- with macOS Time Machine and Migration Assistant
- by cloning and restoring from a clone
- by zipping and unzipping Hookmark’s library folder
These methods are described below.
Where does Hookmark store its data?
First, consider where Hookmark data is stored.
- Hookmark stores its bookmarks and links in the
~/Library/Application Support/com.cogsciapps.hook
folder. - Hookmark also has a preferences file:
~/Library/Preferences/com.cogsciapps.hook.plist
. - Hookmark also creates a
~/Documents/Hook
folder, which contains Hookmark templates and notes created with Hookmark. - At your request, Hookmark can create .hook files, which by default are stored in the
~/Documents/Hook/Hook Files
folder. You can move Hookmark 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 Hookmark’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 Hookmark 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 Hookmark data.
Zipping and unzipping Hookmark’s library folder
You may also zip the content of Hookmark’s ~/Library/Application Support/com.cogsciapps.hook
folder. To restore Hookmark 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, Hookmark 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://`. For Finder files, Hookmark typically copies a URL of the form
hook://file//`. They are known as “Hookmark file-URLs” or “Hookmark file-links”. Their targets can be any files. (Not to be confused with “.hook” files.)
After you restore your Hookmark data, in order for Hookmark (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 Hookmark.
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 Hookmark, then Hookmark 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 Hookmark will attempt to find the targets of your links elsewhere. (This is part of what we mean when we say that Hookmark links are robust.) If in this case you have multiple copies of the target Hookmark files, Hookmark will only choose one target per link. (If that target disappears, Hookmark will attempt to re-anchor the link.)
See also
See also:
- Using Hookmark on Multiple Macs, which explains Hookmark’s nifty sync service.
- Import and Export of Hookmark data.