Document pgbackweb database settings
Hey—
Thanks for pgbackweb! I have just successfully set it up and backed up a database to Cloudflare R2. There were two things that were a bit confusing while setting it up. Just sharing it here in case others stumble upon them.
**Database settings**
I ran into the problem where it tried to use extensions outside of the search path, so the following worked for me. I think it would be helpful to document the settings needed for the goose migrations to run successfully.
As my postgres user:
```
CREATE USER pgbackwebdb WITH CREATEDB PASSWORD 'redacted';
CREATE DATABASE pgbackwebdb;
CREATE EXTENSION IF NOT EXISTS pgcrypto WITH SCHEMA public;
CREATE EXTENSION IF NOT EXISTS "uuid-ossp" WITH SCHEMA public;
```
In the `pgbackwebdb` database:
```
CREATE schema pgbackwebdb;
ALTER ROLE pgbackwebdb SET search_path = pgbackwebdb, public;
GRANT USAGE ON SCHEMA pgbackwebdb TO pgbackwebdb;
GRANT CREATE ON SCHEMA pgbackwebdb TO pgbackwebdb;
ALTER DATABASE pgbackwebdb OWNER TO pgbackwebdb;
GRANT CREATE ON DATABASE pgbackwebdb TO pgbackwebdb;
```
**Cloudflare R2**
The following issue was helpful (https://github.com/eduardolat/pgbackweb/issues/117), maybe having a dropdown to select which S3 provider one is using would be nice.
<img width="1312" height="1046" alt="Image" src="https://github.com/user-attachments/assets/1efa980b-a9e5-4369-a822-4c29658d8a54" />
Thanks!
0 条评论