High performance self-hosted photo and video management solution.
TypeScript backup-toolfluttergoogle-photosgoogle-photos-alternativejavascriptmobile-appnestjsnodejsphoto-galleryphotosphotos-managementself-hostedsveltesveltekittypescriptvideos
fix(docs): add DB_USERNAME when needed (#19578)
Matthew Momjian3d35e65f2707
diff --git a/docs/docs/FAQ.mdx b/docs/docs/FAQ.mdxindex 906d9fd355..9e14d10a0e 100644--- a/docs/docs/FAQ.mdx+++ b/docs/docs/FAQ.mdx@@ -458,7 +458,7 @@ A result of `on` means that checksums are enabled.<summary>Check if checksums are enabled</summary>```bash-docker exec -it immich_postgres psql --dbname=postgres --username=postgres --command="show data_checksums"+docker exec -it immich_postgres psql --dbname=postgres --username=<DB_USERNAME> --command="show data_checksums"data_checksums----------------on@@ -473,7 +473,7 @@ If checksums are enabled, you can check the status of the database with the foll<summary>Check for database corruption</summary>```bash-docker exec -it immich_postgres psql --dbname=postgres --username=postgres --command="SELECT datname, checksum_failures, checksum_last_failure FROM pg_stat_database WHERE datname IS NOT NULL"+docker exec -it immich_postgres psql --dbname=postgres --username=<DB_USERNAME> --command="SELECT datname, checksum_failures, checksum_last_failure FROM pg_stat_database WHERE datname IS NOT NULL"datname | checksum_failures | checksum_last_failure-----------+-------------------+-----------------------postgres | 0 |@@ -490,7 +490,7 @@ You can also scan the Postgres database file structure for errors:<details><summary>Scan for file structure errors</summary>```bash-docker exec -it immich_postgres pg_amcheck --username=postgres --heapallindexed --parent-check --rootdescend --progress --all --install-missing+docker exec -it immich_postgres pg_amcheck --username=<DB_USERNAME> --heapallindexed --parent-check --rootdescend --progress --all --install-missing```A normal result will end something like this and return with an exit code of `0`:diff --git a/docs/docs/administration/backup-and-restore.md b/docs/docs/administration/backup-and-restore.mdindex 7b90c3b19a..50f2d01ebf 100644--- a/docs/docs/administration/backup-and-restore.md+++ b/docs/docs/administration/backup-and-restore.md@@ -57,7 +57,7 @@ Then please follow the steps in the following section for restoring the database<TabItem value="Linux system" label="Linux system" default>```bash title='Backup'-docker exec -t immich_postgres pg_dumpall --clean --if-exists --username=postgres | gzip > "/path/to/backup/dump.sql.gz"+docker exec -t immich_postgres pg_dumpall --clean --if-exists --username=<DB_USERNAME> | gzip > "/path/to/backup/dump.sql.gz"``````bash title='Restore'@@ -79,7 +79,7 @@ docker compose up -d # Start remainder of Immich apps<TabItem value="Windows system (PowerShell)" label="Windows system (PowerShell)">```powershell title='Backup'-[System.IO.File]::WriteAllLines("C:\absolute\path\to\backup\dump.sql", (docker exec -t immich_postgres pg_dumpall --clean --if-exists --username=postgres))+[System.IO.File]::WriteAllLines("C:\absolute\path\to\backup\dump.sql", (docker exec -t immich_postgres pg_dumpall --clean --if-exists --username=<DB_USERNAME>))``````powershell title='Restore'diff --git a/docs/docs/guides/template-backup-script.md b/docs/docs/guides/template-backup-script.mdindex dd0b94ebb1..34381dd0ee 100644--- a/docs/docs/guides/template-backup-script.md+++ b/docs/docs/guides/template-backup-script.md@@ -52,9 +52,9 @@ REMOTE_BACKUP_PATH="/path/to/remote/backup/directory"### Local# Backup Immich database-docker exec -t immich_postgres pg_dumpall --clean --if-exists --username=postgres > "$UPLOAD_LOCATION"/database-backup/immich-database.sql+docker exec -t immich_postgres pg_dumpall --clean --if-exists --username=<DB_USERNAME> > "$UPLOAD_LOCATION"/database-backup/immich-database.sql# For deduplicating backup programs such as Borg or Restic, compressing the content can increase backup size by making it harder to deduplicate. If you are using a different program or still prefer to compress, you can use the following command instead:-# docker exec -t immich_postgres pg_dumpall --clean --if-exists --username=postgres | /usr/bin/gzip --rsyncable > "$UPLOAD_LOCATION"/database-backup/immich-database.sql.gz+# docker exec -t immich_postgres pg_dumpall --clean --if-exists --username=<DB_USERNAME> | /usr/bin/gzip --rsyncable > "$UPLOAD_LOCATION"/database-backup/immich-database.sql.gz### Append to local Borg repositoryborg create "$BACKUP_PATH/immich-borg::{now}" "$UPLOAD_LOCATION" --exclude "$UPLOAD_LOCATION"/thumbs/ --exclude "$UPLOAD_LOCATION"/encoded-video/