updated to deal with backups that come from different devices but have the same device name.