About finding the right person to fire, I suspect that this is an unfortunate but complex choreograph of events such that no single person is at fault, and everyone is doing their jobs.
Junior programmer did the right thing about unit testing: wipe the database between tests to ensure consistent result no matter the order the test cases are run. Senior programmer did the right thing and wrote detailed documentation. The management needed a paper trail for production credential, and the documentation is probably the only SOX compliant way the company has, so the management did the right thing and stored production credential in a SOX compliant way. Production backup is not working but someone is actually working on getting it to work, and they are having trouble with replication and consistency; they want data integrity assurances rather than having backups that could have silent data corruptions.
Everyone is doing their jobs in good faith, and probably doing it well. I think the disaster could have been prevented if someone looked beyond their job responsibility and noticed potential problems, but such busybody could readily cause ire in a hierarchical organization. I think the best thing a company can do is to encourage people to be nosy and speak up. The CEO has to make this part of their corporate culture.