sync.js is an open-source Chrome/Firefox extension that can backup and restore website localstorage data. It uses the Google Drive API to store the data in a json file. If you don't want to install another extension, you can use the avaliable bookmarklets.