backup and restore script modified