add backup function, todo restore