From d5240a24bef94cbc780492aeade0978937d3849f Mon Sep 17 00:00:00 2001 From: izzy Date: Thu, 5 Feb 2026 13:43:55 +0000 Subject: [PATCH] docs: update DB_NAME to DB_DATABASE_NAME --- docs/docs/administration/backup-and-restore.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/docs/docs/administration/backup-and-restore.md b/docs/docs/administration/backup-and-restore.md index 99eb5828d5..ae605f8462 100644 --- a/docs/docs/administration/backup-and-restore.md +++ b/docs/docs/administration/backup-and-restore.md @@ -140,8 +140,8 @@ For advanced users or automated recovery scenarios, you can restore a database b ```bash title='Backup' # Replace with the database username - usually postgres unless you have changed it. -# Replace with the database name - usually immich unless you have changed it. -docker exec -t immich_postgres pg_dump --clean --if-exists --dbname= --username= | gzip > "/path/to/backup/dump.sql.gz" +# Replace with the database name - usually immich unless you have changed it. +docker exec -t immich_postgres pg_dump --clean --if-exists --dbname= --username= | gzip > "/path/to/backup/dump.sql.gz" ``` ```bash title='Restore' @@ -154,10 +154,10 @@ docker start immich_postgres # Start Postgres server sleep 10 # Wait for Postgres server to start up # Check the database user if you deviated from the default # Replace with the database username - usually postgres unless you have changed it. -# Replace with the database name - usually immich unless you have changed it. +# Replace with the database name - usually immich unless you have changed it. gunzip --stdout "/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 --dbname= --username= --single-transaction --set ON_ERROR_STOP=on # Restore Backup +| docker exec -i immich_postgres psql --dbname= --username= --single-transaction --set ON_ERROR_STOP=on # Restore Backup docker compose up -d # Start remainder of Immich apps ``` @@ -166,8 +166,8 @@ docker compose up -d # Start remainder of Immich apps ```powershell title='Backup' # Replace with the database username - usually postgres unless you have changed it. -# Replace with the database name - usually immich unless you have changed it. -[System.IO.File]::WriteAllLines("C:\absolute\path\to\backup\dump.sql", (docker exec -t immich_postgres pg_dump --clean --if-exists --dbname= --username=)) +# Replace with the database name - usually immich unless you have changed it. +[System.IO.File]::WriteAllLines("C:\absolute\path\to\backup\dump.sql", (docker exec -t immich_postgres pg_dump --clean --if-exists --dbname= --username=)) ``` ```powershell title='Restore' @@ -182,9 +182,9 @@ sleep 10 # Wait for Postgres server to docker exec -it immich_postgres bash # Enter the Docker shell and run the following command # If your backup ends in `.gz`, replace `cat` with `gunzip --stdout` # Replace with the database username - usually postgres unless you have changed it. -# Replace with the database name - usually immich unless you have changed it. +# Replace with the database name - usually immich unless you have changed it. -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 --dbname= --username= --single-transaction --set ON_ERROR_STOP=on +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 --dbname= --username= --single-transaction --set ON_ERROR_STOP=on exit # Exit the Docker shell docker compose up -d # Start remainder of Immich apps ```