Y
Y
Yu Yu2017-05-25 20:05:26
PostgreSQL
Yu Yu, 2017-05-25 20:05:26

How to setup postgresql 9.6.3 autostart in Ubuntu server 16.04?

After installing the database, it starts at startup with the database stored in the default directory.
As far as I understand, autorun is written somewhere in /etc/init.d/postgres,
but I can’t find the PGDATA parameter there to change the base directory in autorun.
How can I change it so that the server starts with the database I need?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Anton Ulanov, 2017-05-25
@xztau

everything is easier. Database directories are registered in /etc/postgresql/9.6/postgresql.conf there at the very beginning. If you want to transfer the database, I can write how, because it won’t work there to transfer the folder stupidly

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question