first rough implementation of backup/restore from/to json/xml