Zend certified PHP/Magento developer

Is there a way to implement a backup script?

a few months ago I have lost connections with many devices that were in the field due to an error in the code.
the problem was that those devices had a missing dependency for the new code while our lab test one had those dependencies and after we pushed the update all the devices which were remotes got disconnected.

since then we have improved our testing procedures, however, I was thinking about making two of our critical script. the regular one and a simpler one stripped with most of the fancy thing that will run in case the first one fails to ensure that connection is with those devices never get lost again.

I wanted to know if this a common thing in programming. is there a better way to implement something like this?
my code runs every hour on a cron job. I also thought to write to backup script in a different language, like bash while the main one is written in python