Initial upload of backup.py

Needs a lot of work.  Currently all in single function