Improve backup task and add restore task