Added restore and backup functions.