added some support for backup/restore