backup: implement header restoration for the new backup format