Repository navigation
Roles without name #38447
Replies: 2 comments
|
Any idea? |
|
I dumped the postgresql database to a file, deleted the wrong entries. Dropped the old database and imported the correct dump file. Backup[root@keycloak ~]# su - postgres Restore[root@keycloak ~]# su - postgres All good. |
I dumped the postgresql database to a file, deleted the wrong entries. Dropped the old database and imported the correct dump file.
Backup
[root@keycloak ~]# su - postgres
[postgres@keycloak ~]$ pg_dump keycloakdb > 2024-10-18_keycloakdb.psql.dump
Restore
[root@keycloak ~]# su - postgres
[postgres@keycloak ~] createuser keycloak
[postgres@keycloak ~] createdb keycloakdb
[postgres@keycloak ~] psql
$ alter user keycloak with encrypted password 'password';
$ grant all privileges on database keycloakdb to keycloak;
$ GRANT ALL ON DATABASE keycloakdb TO keycloak;
$ ALTER DATABASE keycloakdb OWNER TO keycloak;
$ GRANT USAGE, CREATE ON SCHEMA PUBLIC TO keycloak;
$ \q
$ logout
[postgres@keycloak …