I have a postgres database with a bytea column with corrupt data. I have recovered an old backup to a different machine and can see this data is not corrupt as per below. When I compare the results on corrupt vs recovered the values are different.

```
SELECT recordid,encode(secretkey::bytea, 'hex') FROM table;

```

I would just like to know the best way export the bytea column from the recovered table to the corrupt table so the data transfers exactly as-is.