The early portion of this recipe focuses on initializing a new cluster using initdb with the target version of PostgreSQL we want to upgrade to. For the purposes of demonstration in this recipe, we used version 11.
As usual when performing this kind of bootstrap, we copy all of the configuration files from the origin node. In this case, we want at least the postgresql.conf and pg_hba.conf files, as they define the majority of our configuration settings and connection access definitions. If your cluster uses the postgresql.conf include_dir directive, copy the full contents of any of those locations as well. It's important to capture as much of the original cluster structure as we can.