Copy postgres config folders as well.
authorGuo Xiang Tan <tgx_world@hotmail.com>
Tue, 3 Apr 2018 07:28:02 +0000 (15:28 +0800)
committerGuo Xiang Tan <tgx_world@hotmail.com>
Tue, 3 Apr 2018 07:28:02 +0000 (15:28 +0800)
templates/postgres.10.template.yml

index 2c2771ef2345eccb84a0af815fb723a2b9e61283..b6c1abd16a5d2b97b64aec6184ea50a5e7abcbbd 100644 (file)
@@ -63,7 +63,7 @@ run:
          /etc/init.d/postgresql stop
          rm -fr /shared/postgres_data/postmaster.pid
          cd ~postgres
-         cp -p /etc/postgresql/${PG_MAJOR_OLD}/main/* /shared/postgres_data
+         cp -pr /etc/postgresql/${PG_MAJOR_OLD}/main/* /shared/postgres_data
          echo  >> /shared/postgres_data/postgresql.conf
          echo "data_directory = '/shared/postgres_data'" >> /shared/postgres_data/postgresql.conf
          SUCCESS=true