fix type
fix backup restore + tests
Merge pull request #1123 from matiu/bug/backup1

Bug/backup1