solve some bugs in creating/recovering backups

Signed-off-by: Karel Kellner <karel@kellner.be>
merge side branch\!

Signed-off-by: Karel Kellner <karel@kellner.be>