diff --git a/docs/docs/FAQ.mdx b/docs/docs/FAQ.mdx
index f82bc74f5ffa97..71ddcf0d33f137 100644
--- a/docs/docs/FAQ.mdx
+++ b/docs/docs/FAQ.mdx
@@ -425,7 +425,7 @@ A result of `on` means that checksums are enabled.
Check if checksums are enabled
```bash
-docker exec -it immich_postgres psql --dbname=immich --username= --command="show data_checksums"
+docker exec -it immich_postgres psql --dbname=postgres --username= --command="show data_checksums"
data_checksums
----------------
on
@@ -440,7 +440,7 @@ If checksums are enabled, you can check the status of the database with the foll
Check for database corruption
```bash
-docker exec -it immich_postgres psql --dbname=immich --username= --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= --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 |
diff --git a/docs/docs/administration/backup-and-restore.md b/docs/docs/administration/backup-and-restore.md
index 1b1775018efe36..cd58604e1f4d60 100644
--- a/docs/docs/administration/backup-and-restore.md
+++ b/docs/docs/administration/backup-and-restore.md
@@ -55,7 +55,7 @@ sleep 10 # Wait for Postgres server to start up
# Check the database user if you deviated from the default
gunzip < "/path/to/backup/dump.sql.gz" \
| sed "s/SELECT pg_catalog.set_config('search_path', '', false);/SELECT pg_catalog.set_config('search_path', 'public, pg_catalog', true);/g" \
-| docker exec -i immich_postgres psql --username=postgres # Restore Backup
+| docker exec -i immich_postgres psql --dbname=postgres --username= # Restore Backup
docker compose up -d # Start remainder of Immich apps
```
@@ -70,18 +70,18 @@ docker compose up -d # Start remainder of Immich apps
docker compose down -v # CAUTION! Deletes all Immich data to start from scratch
## Uncomment the next line and replace DB_DATA_LOCATION with your Postgres path to permanently reset the Postgres database
# Remove-Item -Recurse -Force DB_DATA_LOCATION # CAUTION! Deletes all Immich data to start from scratch
-## You should mount the backup (as a volume, example: - 'C:\path\to\backup\dump.sql':/dump.sql) into the immich_postgres container using the docker-compose.yml
-docker compose pull # Update to latest version of Immich (if desired)
-docker compose create # Create Docker containers for Immich apps without running them
-docker start immich_postgres # Start Postgres server
-sleep 10 # Wait for Postgres server to start up
-docker exec -it immich_postgres bash # Enter the Docker shell and run the following command
-# Check the database user if you deviated from the default
-cat "/dump.sql" \
+## You should mount the backup (as a volume, example: `- 'C:\path\to\backup\dump.sql:/dump.sql'`) into the immich_postgres container using the docker-compose.yml
+docker compose pull # Update to latest version of Immich (if desired)
+docker compose create # Create Docker containers for Immich apps without running them
+docker start immich_postgres # Start Postgres server
+sleep 10 # Wait for Postgres server to start up
+docker exec -it immich_postgres bash # Enter the Docker shell and run the following command
+# Check the database user if you deviated from the default. If your backup ends in `.gz`, replace `cat` with `gunzip`
+cat < "/dump.sql" \
| sed "s/SELECT pg_catalog.set_config('search_path', '', false);/SELECT pg_catalog.set_config('search_path', 'public, pg_catalog', true);/g" \
-| psql --username=postgres # Restore Backup
-exit # Exit the Docker shell
-docker compose up -d # Start remainder of Immich apps
+| psql --dbname=postgres --username= # Restore Backup
+exit # Exit the Docker shell
+docker compose up -d # Start remainder of Immich apps
```
diff --git a/docs/docs/guides/database-queries.md b/docs/docs/guides/database-queries.md
index 0e58d84f90c010..e71fa21c8b0414 100644
--- a/docs/docs/guides/database-queries.md
+++ b/docs/docs/guides/database-queries.md
@@ -5,9 +5,9 @@ Keep in mind that mucking around in the database might set the moon on fire. Avo
:::
:::tip
-Run `docker exec -it immich_postgres psql --dbname=immich --username=` to connect to the database via the container directly.
+Run `docker exec -it immich_postgres psql --dbname= --username=` to connect to the database via the container directly.
-(Replace `` with the value from your [`.env` file](/docs/install/environment-variables#database)).
+(Replace `` and `` with the values from your [`.env` file](/docs/install/environment-variables#database)).
:::
## Assets