D
D
Drno2020-12-08 18:29:11
linux
Drno, 2020-12-08 18:29:11

How to move a database to another drive?

Good day. We have Nextcloud installed with a PostgreSQL database. OC - ​​Debian10

A raid of 2 ssds will be created, I want to transfer the database to it (does the performance depend on it?) And files.
There are no problems with the files, the question is how best to drag them to the new Postgres raid

Well, after that - the same question about the docker... I also want to drag it to the new raid...

The docker application seems to be all in one place, in /opt. ..

Create symlinks?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vladimir, 2020-12-08
@Drno

postgres has a variable that defines the path to the folder with the database files, you can stop the service, transfer files, correct the path in the variable and start postgres.
Editing a variable with the path:
systemctl edit postgresql.service
and write
[Service]
Environment=PGDATA=/newdirectory/postgresql/data
There, alas, I can’t tell you about docker - I don’t use it.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question