Add metadata for state backups.

This is part of my effort to split up the work for backups into a few smaller patches.
1) Is this second "storing" intended?
2) But I'm not quite sure we even need this type, do we?