SQL Recovery Question

I was wondering if I could get some advice on recovering from backup. Everything in my
UPLOAD_LOCATION
is safe but I lost my postgres db. Thankfully there is a backup that immich has. This is the restore steps.

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
# rm -rf DB_DATA_LOCATION # CAUTION! Deletes all Immich data to start from scratch
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
# Check the database user if you deviated from the default
# Replace <DB_USERNAME> with the database username - usually postgres 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=postgres --username=<DB_USERNAME>  # Restore Backup
docker compose up -d            # Start remainder of Immich apps

I was wondering does
docker compose down -v
delete my
UPLOAD_LOCATION
cause I currently still have my video and photos that are safe in my
UPLOAD_LOCATION
and should I change my
UPLOAD_LOCATION
or copy/backup certain folders just incase it messing up.

My
UPLOAD_LOCATION
is on truenas and I took snapshot of all the data before it got deleted.
Was this page helpful?