@@ -34,14 +34,15 @@ docker exec -t immich_postgres pg_dumpall --clean --if-exists --username=postgre
34
34
docker compose down -v # CAUTION! Deletes all Immich data to start from scratch
35
35
# # Uncomment the next line and replace DB_DATA_LOCATION with your Postgres path to permanently reset the Postgres database
36
36
# rm -rf DB_DATA_LOCATION # CAUTION! Deletes all Immich data to start from scratch
37
- docker compose pull # Update to latest version of Immich (if desired)
38
- docker compose create # Create Docker containers for Immich apps without running them
37
+ docker compose pull # Update to latest version of Immich (if desired)
38
+ docker compose create # Create Docker containers for Immich apps without running them
39
39
docker start immich_postgres # Start Postgres server
40
- sleep 10 # Wait for Postgres server to start up
40
+ sleep 10 # Wait for Postgres server to start up
41
+ # Check the database user if you deviated from the default
41
42
gunzip < " /path/to/backup/dump.sql.gz" \
42
43
| sed " s/SELECT pg_catalog.set_config('search_path', '', false);/SELECT pg_catalog.set_config('search_path', 'public, pg_catalog', true);/g" \
43
- | docker exec -i immich_postgres psql --username=postgres # Restore Backup
44
- docker compose up -d # Start remainder of Immich apps
44
+ | docker exec -i immich_postgres psql --username=postgres # Restore Backup
45
+ docker compose up -d # Start remainder of Immich apps
45
46
```
46
47
47
48
</TabItem >
@@ -55,12 +56,13 @@ docker exec -t immich_postgres pg_dumpall --clean --if-exists --username=postgre
55
56
docker compose down -v # CAUTION! Deletes all Immich data to start from scratch
56
57
## Uncomment the next line and replace DB_DATA_LOCATION with your Postgres path to permanently reset the Postgres database
57
58
# Remove-Item -Recurse -Force DB_DATA_LOCATION # CAUTION! Deletes all Immich data to start from scratch
58
- docker compose pull # Update to latest version of Immich (if desired)
59
- docker compose create # Create Docker containers for Immich apps without running them
59
+ docker compose pull # Update to latest version of Immich (if desired)
60
+ docker compose create # Create Docker containers for Immich apps without running them
60
61
docker start immich_postgres # Start Postgres server
61
- sleep 10 # Wait for Postgres server to start up
62
- gc "C:\path\to\backup\dump.sql" | docker exec -i immich_postgres psql --username=postgres # Restore Backup
63
- docker compose up -d # Start remainder of Immich apps
62
+ sleep 10 # Wait for Postgres server to start up
63
+ # Check the database user if you deviated from the default
64
+ gc "C:\path\to\backup\dump.sql" | docker exec -i immich_postgres psql --username=postgres # Restore Backup
65
+ docker compose up -d # Start remainder of Immich apps
64
66
```
65
67
66
68
</TabItem >
@@ -103,6 +105,7 @@ services:
103
105
Then you can restore with the same command but pointed at the latest dump.
104
106
105
107
` ` ` bash title='Automated Restore'
108
+ # Be sure to check the username if you changed it from default
106
109
gunzip < db_dumps/last/immich-latest.sql.gz \
107
110
| sed "s/SELECT pg_catalog.set_config('search_path', '', false);/SELECT pg_catalog.set_config('search_path', 'public, pg_catalog', true);/g" \
108
111
| docker exec -i immich_postgres psql --username=postgres
0 commit comments