initial commit of backup script

This initial commit corresponds to a first version of the backup script.
It is obfuscated and probably of less use to others. Upcoming commits will
refactor the script to be more powerful.