Simple question: I want to migrate all of a Postgres server's data, schema, roles, everything from Windows to Linux.
Can I just copy the contents of the
%PGDATA% directory in Windows to which the server points to Linux and start the server there pointing PGDATA argument/variable to that directory? In other words, are the data files platform independent to make porting from one OS to another a matter of copying?
I also have developed a script for cloning PG databases, schema+data but, for a variety of reasons, I would prefer to just put the data files on a USB drive and be done with it.