$ ls docker-compose.yml library postgres $ docker compose down -v [+] Running 6/6 ✔ Container immich_server Removed 0.3s ✔ Container immich_machine_learning Removed 0.2s ✔ Container immich_redis Removed 0.2s ✔ Container immich_postgres Removed 0.7s ✔ Volume immich_model-cache Removed 0.0s ✔ Network immich_default Removed 0.2s $ sudo rm -rf postgres $ ls docker-compose.yml library $ docker compose pull [+] Pulling 4/4 ✔ immich-machine-learning Pulled 0.9s ✔ redis Pulled 0.6s ✔ database Pulled 0.3s ✔ immich-server Pulled 1.0s $ docker compose create [+] Creating 6/6 ✔ Network immich_default Created 0.0s ✔ Volume immich_model-cache Created 0.0s ✔ Container immich_redis Created 0.0s ✔ Container immich_postgres Created 0.0s ✔ Container immich_machine_learning Created 0.0s ✔ Container immich_server Created 0.0s $ docker start immich_postgres immich_postgres $ docker compose logs immich_postgres | Using SSD storage immich_postgres | The files belonging to this database system will be owned by user "postgres". immich_postgres | This user must also own the server process. immich_postgres | immich_postgres | The database cluster will be initialized with locale "en_US.utf8". immich_postgres | The default database encoding has accordingly been set to "UTF8". immich_postgres | The default text search configuration will be set to "english". immich_postgres | immich_postgres | Data page checksums are enabled. immich_postgres | immich_postgres | fixing permissions on existing directory /var/lib/postgresql/data ... ok immich_postgres | creating subdirectories ... ok immich_postgres | selecting dynamic shared memory implementation ... posix immich_postgres | selecting default max_connections ... 100 immich_postgres | selecting default shared_buffers ... 128MB immich_postgres | selecting default time zone ... Etc/UTC immich_postgres | creating configuration files ... ok immich_postgres | running bootstrap script ... ok immich_postgres | performing post-bootstrap initialization ... ok immich_postgres | syncing data to disk ... ok immich_postgres | immich_postgres | immich_postgres | Success. You can now start the database server using: immich_postgres | immich_postgres | pg_ctl -D /var/lib/postgresql/data -l logfile start immich_postgres | immich_postgres | initdb: warning: enabling "trust" authentication for local connections immich_postgres | You can change this by editing pg_hba.conf or using the option -A, or immich_postgres | --auth-local and --auth-host, the next time you run initdb. immich_postgres | 2025-11-02 13:49:02.176 GMT [49] LOG: skipping missing configuration file "/var/lib/postgresql/data/postgresql.override.conf" immich_postgres | 2025-11-02 13:49:02.176 GMT [49] LOG: skipping missing configuration file "/var/lib/postgresql/data/postgresql.override.conf" immich_postgres | waiting for server to start....2025-11-02 13:49:02.206 GMT [54] LOG: skipping missing configuration file "/var/lib/postgresql/data/postgresql.override.conf" immich_postgres | 2025-11-02 13:49:02.206 GMT [54] LOG: skipping missing configuration file "/var/lib/postgresql/data/postgresql.override.conf" immich_postgres | 2025-11-02 13:49:02.227 UTC [54] LOG: starting PostgreSQL 14.18 (Debian 14.18-1.pgdg120+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 12.2.0-14) 12.2.0, 64-bit immich_postgres | 2025-11-02 13:49:02.228 UTC [54] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432" immich_postgres | 2025-11-02 13:49:02.233 UTC [55] LOG: database system was shut down at 2025-11-02 13:49:01 UTC immich_postgres | 2025-11-02 13:49:02.238 UTC [54] LOG: database system is ready to accept connections immich_postgres | done immich_postgres | server started immich_postgres | CREATE DATABASE immich_postgres | immich_postgres | immich_postgres | /usr/local/bin/docker-entrypoint.sh: ignoring /docker-entrypoint-initdb.d/* immich_postgres | immich_postgres | 2025-11-02 13:49:02.694 UTC [54] LOG: received fast shutdown request immich_postgres | waiting for server to shut down....2025-11-02 13:49:02.695 UTC [54] LOG: aborting any active transactions immich_postgres | 2025-11-02 13:49:02.698 UTC [54] LOG: background worker "logical replication launcher" (PID 64) exited with exit code 1 immich_postgres | 2025-11-02 13:49:02.699 UTC [59] LOG: shutting down immich_postgres | 2025-11-02 13:49:02.718 UTC [54] LOG: database system is shut down immich_postgres | done immich_postgres | server stopped immich_postgres | immich_postgres | PostgreSQL init process complete; ready for start up. immich_postgres | immich_postgres | 2025-11-02 13:49:02.806 GMT [1] LOG: skipping missing configuration file "/var/lib/postgresql/data/postgresql.override.conf" immich_postgres | 2025-11-02 13:49:02.806 GMT [1] LOG: skipping missing configuration file "/var/lib/postgresql/data/postgresql.override.conf" immich_postgres | 2025-11-02 13:49:02.824 UTC [1] LOG: starting PostgreSQL 14.18 (Debian 14.18-1.pgdg120+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 12.2.0-14) 12.2.0, 64-bit immich_postgres | 2025-11-02 13:49:02.825 UTC [1] LOG: listening on IPv4 address "0.0.0.0", port 5432 immich_postgres | 2025-11-02 13:49:02.825 UTC [1] LOG: listening on IPv6 address "::", port 5432 immich_postgres | 2025-11-02 13:49:02.827 UTC [1] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432" immich_postgres | 2025-11-02 13:49:02.831 UTC [72] LOG: database system was shut down at 2025-11-02 13:49:02 UTC immich_postgres | 2025-11-02 13:49:02.836 UTC [1] LOG: database system is ready to accept connections $ gunzgunzip --stdout "/home/albert/Backup/20251101-151733/db_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=postgres --username=postgres