Restoring CloudTabs.db

I’m terrible about opening lots of tabs and then quitting Safari twice to lose them. Or do you?

I’ve found if you have Time Machine running on your Mac, it’s possible to restore your lost tabs if you restore the Cloudtabs.db file, saved here:

/Users/(your user folder)/Library/Containers/com.apple.Safari/Data/Library/Safari/CloudTabs.db

I’ve been able to restore the file such that Safari will launch with all your tabs in place before you lost them, but I seem to have forgotten how I did that. As a temporary workaround, you can open the CloudTabs.db file with “DB Browser for SQLite“. After you double-click CloudTabs.db to open your lost tabs, click “Browse Data” to view your tab information.

When I lose all my tabs in another month, I may try to figure out how to do a quicker restore that brings back Safari’s window and tabs in the same place they were, but for now you get this post. According to my notes though, all I had to do was restore the history db files, but I think it’s more complicated than that… According to this one you just have to restore all 3 CloudTabs.db files, presumably they mean CloudTabs.db, CloudTabs.db-shm, and CloudTabs.db-wal? And the most interesting link is that the backup files have moved and now reside here:

~/Library/Containers/com.apple.Safari/Data/Library/Safari/CloudTabs.db

Will report more later when I can try this with my Time Machine backups at home.

Leave a Reply

Your email address will not be published.