Merge "Add dogtag restore script and restore state"