Added backup and restore functionality