Backup and Restore engine in python