def restore_session(self, cookie):
        """Establish databse connection using permanent session cookie"""
        log.debug("Restoring session from cookie: {}".format(cookie))
        opener = build_opener()
        opener.addheaders.append(('Cookie', cookie))
        self._opener = opener