Help on setting up borg backup

Hi, I have immich running on a raspberry pi 5 and it is working well, with my photos and videos stored on a connected ssd drive. I'd now like to start backing up the database and the library. As a first step I am adding a second connected drive, and want to create a backup there. I am looking at the sample script in the docs, which starts with:

UPLOAD_LOCATION="/path/to/immich/directory" # Immich database location, as set in your .env file
BACKUP_PATH="/path/to/local/backup/directory"

I assume the BACKUP_PATH should be set to a directory on the new hard drive. The UPLOAD_LOCATION though I am not sure. In my .env file, I have configured immich as

The location where your uploaded files are stored

UPLOAD_LOCATION="/media/balents/Extreme Pro/library"

The location where your database files are stored

DB_DATA_LOCATION=./postgres

So the immich database is not in the same location as the library. I am guessing that if I for example set UPLOAD_LOCATION to the match the one in my .env, my library will be backed up but not the database? Do I need to just create two different backups?

Thanks!
Was this page helpful?