Implemented restore procedure

fixed recursion in both backup and restore (slashes)
hypothetically the code to backup and restore is fully implemented… now
we need to run against test cases….!