The ESXi configuration can be saved using vSPhere CLI, with the vicfg-cfgbackup command.
vicfg-cfgbackup - back up and restore ESXi host configurations
The vCenter configuration resides basically on the database. Having a DB backup will save you from any harm VC can have.