Right, once you update Barman in your backup host, it will start accepting sha256 as well.
About previously archived WAL files, you don't need to care about them.
The md5 or sha256 sum is used by the server only when receiving the WAL file through `barman-wal-archive`, to make sure it's receiving the expected content.
The `--md5` flag was introduced to `barman-wal-archive` as a temporary workaround for people that upgrade `barman-cli` in the Postgres host before upgrading `barman` in the Barman host.
That way, as the server would only check for md5, and the client would ship sha256 by default, you could use the flag to instruct the client to ship md5 instead, making it possible for the server to accept the WAL file.
It is worth noting that you only hit that situation if you upgrade the client before upgrading the server.
In cases where the server is upgraded first, it's able to handle both md5 and sha256, thus keeping compatibility with `barman-cli` older than 3.12.0 with no changes being required.
In any case, if you upgraded the client first and you are using `--md5` for now, it's recommended switching to sha256 once both the client and server are running 3.12.0 or newer.
Best regards,
Israel.