Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PostgreSQL backups (ocp13, ocp24) #420

Closed
2 tasks done
ghost opened this issue Apr 5, 2023 · 4 comments · Fixed by #512
Closed
2 tasks done

PostgreSQL backups (ocp13, ocp24) #420

ghost opened this issue Apr 5, 2023 · 4 comments · Fixed by #512
Labels
S: credere Relating to the Credere server S: registry Relating to the Registry service/server
Milestone

Comments

@ghost
Copy link

ghost commented Apr 5, 2023

Linode provides file backups which is fine for site files however this is not ideal for Postgres.
During the backup Postgres will still have data loaded into memory so we cannot ensure the quality of a backup using this approach.

We should use pgBackRest to store backups in AWS S3, as we have done on other servers
https://ocdsdeploy.readthedocs.io/en/latest/develop/update/postgres.html#set-up-backups

pgBackRest has the added benefit that it is offsite and recoverable without Linode.


Other non-development servers with postgres but without pgbackrest:

  • Credere (ocp24)
  • Registry (ocp13) (see also Registry: Read-only backup server #289)
    • Only the data_registry and spoonbill_web databases. (kingfisher_process, pelican_backend and pelican_frontend have transient data only.)
@ghost ghost added the redash label Apr 5, 2023
@jpmckinney jpmckinney added this to the Medium priority milestone Jun 14, 2023
@jpmckinney jpmckinney changed the title Redash PostgreSQL backups PostgreSQL backups Sep 7, 2023
@jpmckinney jpmckinney added S: registry Relating to the Registry service/server S: credere Relating to the Credere server labels Dec 15, 2023
@jpmckinney jpmckinney changed the title PostgreSQL backups PostgreSQL backups (ocp13, ocp14, ocp24) Mar 27, 2024
@jpmckinney jpmckinney changed the title PostgreSQL backups (ocp13, ocp14, ocp24) PostgreSQL backups (ocp13, ocp24) Jun 7, 2024
@RobHooper
Copy link
Contributor

Credere production backups setup:
a86c0d5

@jpmckinney
Copy link
Member

Just curious how the value max_wal_senders = 4 is decided?

@RobHooper
Copy link
Contributor

@jpmckinney , max_wal_senders limits the number of concurrent connections streaming WAL data, usually this is to configure database replication but it is also used for our backups.
Theoretically we should only need 1 concurrent connection but most sources recommend 3. 3 allows admins to add replication easily in the future if needed, it also leaves room if a connections hang.

I set 4 for Credere as an educated estimate being more limited than the default value (10) but happy to reduce.

@jpmckinney
Copy link
Member

Cool, was just wondering as kingfisher-main was set to 5, but it seems like the rule is at least 3, but less than 10.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S: credere Relating to the Credere server S: registry Relating to the Registry service/server
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants