Fix restore and dump. Handle backup:export hook