High performance self-hosted photo and video management solution.
TypeScript backup-toolfluttergoogle-photosgoogle-photos-alternativejavascriptmobile-appnestjsnodejsphoto-galleryphotosphotos-managementself-hostedsveltesveltekittypescriptvideos
fix(docs): database name for restore commands (#15276)
Matthew Momjianb74f013b5394
diff --git a/docs/docs/FAQ.mdx b/docs/docs/FAQ.mdxindex f82bc74f5f..71ddcf0d33 100644--- a/docs/docs/FAQ.mdx+++ b/docs/docs/FAQ.mdx@@ -425,7 +425,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=immich --username=<DB_USERNAME> --command="show data_checksums"+docker exec -it immich_postgres psql --dbname=postgres --username=<DB_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<summary>Check for database corruption</summary>```bash-docker exec -it immich_postgres psql --dbname=immich --username=<DB_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=<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 |diff --git a/docs/docs/administration/backup-and-restore.md b/docs/docs/administration/backup-and-restore.mdindex 1b1775018e..cd58604e1f 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 defaultgunzip < "/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=<DB_USERNAME> # Restore Backupdocker compose up -d # Start remainder of Immich apps```@@ -70,18 +70,18 @@ docker compose up -d # Start remainder of Immich appsdocker 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=<DB_USERNAME> # Restore Backup+exit # Exit the Docker shell+docker compose up -d # Start remainder of Immich apps```</TabItem>diff --git a/docs/docs/guides/database-queries.md b/docs/docs/guides/database-queries.mdindex 0e58d84f90..e71fa21c8b 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=<DB_USERNAME>` to connect to the database via the container directly.+Run `docker exec -it immich_postgres psql --dbname=<DB_DATABASE_NAME> --username=<DB_USERNAME>` to connect to the database via the container directly.-(Replace `<DB_USERNAME>` with the value from your [`.env` file](/docs/install/environment-variables#database)).+(Replace `<DB_DATABASE_NAME>` and `<DB_USERNAME>` with the values from your [`.env` file](/docs/install/environment-variables#database)).:::## Assets