I have 2 VMs, both are identical in structural terms (came from the same snapshot, nothing installed, upgraded or removed).
One VM is “clean”, never used.
The other VMs was heavily used and it has some data stored in the Postgres DB.
Is there a way to migrate the Postgres database from the heavily used VM to the clean VM just by copying the DB files from a specific folder?
For instance, let’s say that Postgres (I’m assuming this part) writes all its files in the directory XYZ. If I copy all files from that XYZ directory to the clean VM, will Postgres work?
I’m not worried if that is the correct way to do that or not. This is just a PoC and I need to do it with the least effort possible and copying files around seems to be the best fit here.