Changing the host associated with commands in history

I like to use the “host” filter mode by default, but I recently changed the hostname of my computer breaking command history. Is there a way to rename a host in the history to match the new one, or something similar that would let me “move over” my command history to the new hostname? I use sync if that’s relevant, and there are multiple other hosts on there.