MACRO: Backup Chrome Bookmarks Nightly

This macro backs up Chrome bookmarks automatically to an HTML file titled "Bookmarks YYYY-MM-DD HH.MM.SS.html".

My bookmarks and opened and saved tabs (via the Session Buddy extension) are crucial to my daily work. Because I have Chrome's bookmarks syncing with half a dozen other Mac and Win computers, then to Safari as a gateway to sync bookmarks back and forth with Safari on my iPad, things can sometimes go wrong. Bookmarks can get dropped or duplicated--especially if you use XMarks and disparate devices and browsers. This little macro keeps my bookmarks safe daily. A Hazel rule deletes any backups older than 3 months. I have a similar macro to backup Session Buddy's saved Tab sessions.

It's a simple macro, with long pauses to account for the system or Chrome being busy. (This runs unattended, in the middle of the night, so the pauses don't disrupt me). If you want to use it, change the path to the correct folder for your backups in the Insert Text action.

BACKUP Chrome Bookmarks.kmmacros (28 KB)

Hi iampariah,

Cool macro!

Google Chrome actually stores it’s bookmarks in a file in Application Support:

Macintosh HD/Users/YOURUSERNAME/Library/Application Support/Google/Chrome/Default/Bookmarks

Ultimately you might be better off using a shell command and keyboard maestro’s Run Shell Script:

cp "/Users/YOURUSERNAME/Library/Application Support/Google/Chrome/Default/Bookmarks" /Users/YOURUSERNAME/Documents/GoogleChromeBackup.txt

and if you want the date of backups as well:

theDate=$(date +%Y-%m-%d-%H-%M-%S)
cp "/Users/jameswarren/Library/Application Support/Google/Chrome/Default/Bookmarks" "/Users/YOURUSERNAME/Documents/GoogleChromeBackup"$theDate".txt"

The advantage is that this is completely ‘silent’. So you could even have hourly backups if you want :slight_smile: