Add metadata for state backups.

This is part of my effort to split up the work for backups into a few smaller patches.
None of that information (time, machine ID, PID, counter) seems particularly sensitive. Do we really care? We're storing timestamp and hostname already.