Add metadata for state backups.

This is part of my effort to split up the work for backups into a few smaller patches.
hostname, _ := os.Hostname()

but i strongly argue if we can't figure out the hostname of the machine then we should not continue