database restore relies on backend's db user having CREATE DATABASE permission
- Dominant language
- JavaScript
- Stars
- 226
- Forks
- 235
- Avg merge
- 2d 22h
- Merged PRs (30d)
- 19
Description
e.g.
```
node lib/bin/restore.js backup.zip
Error: Command failed: pg_restore -e -j 4 -F d -C -c -h localhost -U jubilant -d template1 /tmp/tmp-7631-WFKGx0tynuTe
pg_restore: while PROCESSING TOC:
pg_restore: from TOC entry 3920; 1262 16385 DATABASE jubilant jubilant
pg_restore: error: could not execute query: ERROR: permission denied to create database
Command was: CREATE DATABASE jubilant WITH TEMPLATE = template0 ENCODING = 'UTF8' LOCALE = 'en_US.utf8';
at genericNodeError (node:internal/errors:983:15)
at wrappedFn (node:internal/errors:537:14)
at ChildProcess.exithandler (node:child_process:414:12)
at ChildProcess.emit (node:events:524:28)
at ChildProcess.emit (node:domain:489:12)
at maybeClose (node:internal/child_process:1101:16)
at ChildProcess._handle.onexit (node:internal/child_process:304:5) {
code: 1,
killed: false,
signal: null,
cmd: 'pg_restore -e -j 4 -F d -C -c -h localhost -U jubilant -d template1 /tmp/tmp-7631-WFKGx0tynuTe',
stdout: '',
stderr: 'pg_restore: while PROCESSING TOC:\n' +
'pg_restore: from TOC entry 3920; 1262 16385 DATABASE jubilant jubilant\n' +
'pg_restore: error: could not execute query: ERROR: permission denied to create database\n' +
"Command was: CREATE DATABASE jubilant WITH TEMPLATE = template0 ENCODING = 'UTF8' LOCALE = 'en_US.utf8';\n" +
'\n' +
'\n'
}
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.