Skip to content

Commit

Permalink
docs: brief instructions to recover from corruption (#10319)
Browse files Browse the repository at this point in the history
* brief instructions for corruption

* Update FAQ.mdx
  • Loading branch information
mmomjian authored Jun 14, 2024
1 parent e3a314b commit 596412c
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions docs/docs/FAQ.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -408,4 +408,11 @@ docker exec -it immich_postgres psql --dbname=immich --username=<DB_USERNAME> --

</details>

If corruption is detected, you should immediately make a backup before performing any other work in the database.
To do so, you may need to set the `zero_damaged_pages=on` flag for the database server to allow `pg_dumpall` to succeed.
After taking a backup, the recommended next step is to restore the database from a healthy backup before corruption was detected.
The damaged database dump can be used to manually recover any changes made since the last backup, if needed.

The causes of possible corruption are many, but can include unexpected poweroffs or unmounts, use of a network share for Postgres data, or a poor storage medium such an SD card or failing HDD/SSD.

[huggingface]: https://huggingface.co/immich-app

0 comments on commit 596412c

Please sign in to comment.