A Research Data Repository Service for Managing Metadata Documents based on JSON or XML.
# Install postgreSQL
user@localhost:/home/user/$sudo apt install postgresql
[...]
user@localhost:/home/user/$
Now postgreSQL is available on localhost via port 5432.
user@localhost:/home/user/$sudo -u postgres psql
psql (12.3 (Debian 12.3-1.pgdg100+1))
Type "help" for help.
postgres=# CREATE DATABASE metastore;
CREATE DATABASE
postgres=# CREATE USER metastore_admin WITH ENCRYPTED PASSWORD 'METASTORE_ADMIN_PASSWORD';
CREATE ROLE
postgres=# GRANT ALL PRIVILEGES ON DATABASE metastore TO metastore_admin;
GRANT
postgres=# \q
user@localhost:/home/user/$
Now postgreSQL is setup for MetaStore.
For using this database the settings in ‘application.properties’ should look like this:
[...]
#spring datasource settings
spring.datasource.platform: postgres
spring.datasource.url: jdbc:postgresql://localhost:5432/metastore
spring.datasource.username: metastore_admin
spring.datasource.password: METASTORE_ADMIN_PASSWORD
spring.datasource.driverClassName: org.postgresql.Driver
spring.jpa.database: POSTGRESQL
spring.jpa.database-platform: org.hibernate.dialect.PostgreSQLDialect
spring.jpa.hibernate.ddl-auto: update
[...]
user@localhost:/home/user/$sudo -u postgres psql
psql (12.3 (Debian 12.3-1.pgdg100+1))
Type "help" for help.
postgres=# CREATE DATABASE indexing;
CREATE DATABASE
postgres=# CREATE USER indexing_admin WITH ENCRYPTED PASSWORD 'INDEXING_ADMIN_PASSWORD';
CREATE ROLE
postgres=# GRANT ALL PRIVILEGES ON DATABASE indexing TO indexing_admin;
GRANT
postgres=# \q
user@localhost:/home/user/$
Now postgreSQL is setup for indexing-service.
For using this database the settings in ‘application.properties’ should look like this:
[...]
#spring datasource settings
spring.datasource.platform: postgres
spring.datasource.url: jdbc:postgresql://localhost:5432/indexing
spring.datasource.username: indexing_admin
spring.datasource.password: INDEXING_ADMIN_PASSWORD
spring.datasource.driverClassName: org.postgresql.Driver
spring.jpa.database: POSTGRESQL
spring.jpa.database-platform: org.hibernate.dialect.PostgreSQLDialect
spring.jpa.hibernate.ddl-auto: update
[...]
To start/stop docker service afterwards use
user@localhost:/home/user/$sudo systemctl start postgresql
user@localhost:/home/user/$sudo systemctl stop postgresql
# Backup metastore
user@localhost:/home/user/$sudo -u postgres pg_dump metastore > dump_metastore_`date +%Y_%m_%dt%H_%M`.sql"
# Backup indexing-service
user@localhost:/home/user/$sudo -u postgres pg_dump indexing > dump_indexing_`date +%Y_%m_%dt%H_%M`.sql"
« PREVIOUS | NEXT » |
---|---|