[Guide] Database backup in Truenas #8809
Replies: 9 comments 23 replies
-
I love immich but all the breaking changes on major released stopped me from using it. I was waiting for exactly the same. How to restore from truenas apps instead of container. Thank you for the info. Ill try |
Beta Was this translation helpful? Give feedback.
-
Same happened to me . Yes you can I tested and it works. The instructions are a little confusing You have to select save as sql . Click on the ? Mark to see the details in pgadmin. This is a game changer at least for me. Now I can backup the db in truenas scale. I was able to backup and restore from scratch
Thank you,
Diego
…________________________________
From: Wayne Scott ***@***.***>
Sent: Monday, May 6, 2024 9:08:05 PM
To: immich-app/immich ***@***.***>
Cc: Dievale ***@***.***>; Comment ***@***.***>
Subject: Re: [immich-app/immich] [Guide] Database backup in Truenas (Discussion #8809)
This does allow me to connect to the database with pgadmin, but it doesn't seem to work to restore the pgbackup files that are automatically saved by the current immich image. Those are .SQL files that want to be restored with psql.
—
Reply to this email directly, view it on GitHub<#8809 (reply in thread)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AI4F45AQO2CE5WE7COLILJTZBASPLAVCNFSM6AAAAABGHK6IW6VHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM4TGMZVGUZTS>.
You are receiving this because you commented.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Do you think its possible to migrate from a standalone immich environment running on docker to the trunas application? I have typical docker-compose immich server running on a separate machine and I want to migrate over to my new trunas machine and I have been struggling to figure out how. Some of the folder names are different, like Following your instructions and so far they've been flawless -- however when it comes to restoring a backup .. how do i get my backup from my other server into the scope of pgadmin in the immich-postgres container? |
Beta Was this translation helpful? Give feedback.
-
How to start pgAdmin in TrueNAS to backup immich database? |
Beta Was this translation helpful? Give feedback.
-
i tryed the commands above from my immich with 60gb of disk usage with images and videos |
Beta Was this translation helpful? Give feedback.
-
Hey thanks for the information. I'm moving from the TrueCharts deployment to the TrueNAS one, since TrueCharts will be deprecated and also was not updating for me anymore. I've come very far with all the available information. The only issue I have left is that the current PostgreSQL version of the TrueNAS app is 15 and the ProstgreSQL version of the TrueCharts deployment was/is 16 with their Cloudnative-PG. |
Beta Was this translation helpful? Give feedback.
-
Now that HeavyScript is no longer supporting TrueNAS, is there another way to do backups? |
Beta Was this translation helpful? Give feedback.
-
Maybe you can try this, if you are running Immich on TrueNAS: |
Beta Was this translation helpful? Give feedback.
-
I've done without HeavyScripts or pgadmin. I've detailed the steps here . |
Beta Was this translation helpful? Give feedback.
-
I recently started using Truenas to deploy Immich, I ran into a lot of missing information about how it's deployed.
As part of this their layout includes a different name for the database (immich&immich) rather than immich and postgres which has led to a lot of confusion.
In addition the database password is generated randomly without the user knowing what it is (It does not appear in the Truenas documentation).
How is it tested?
The backup was created on Immich with an environment of 260 images (including machine learning running)
and successful restoration of the backup.
Problems:
During the restoration process I encountered a problem that the names of the places were not restored at all, this is a known problem #7004.
Guide
Truenas Dragonfish version
Backup
immich old version < v1.105.1
1. [HeavyScript](https://github.com/Heavybullets8/heavy_script) and pgAdmin must be installed. 2. Go to System Settings -> Shell and enter: `sudo heavyscript dns immich` Copy the entry of immich-postgres It should look something like this: `immich-postgres.ix-immich.svc.cluster.local` 3. Now enter: `heavyscript pod -s immich` 4. Select immich-postgres. 5. Now write `env` and copy the POSTGRES_PASSWORD value. 6. Identify your database password, save it!Now go to pgAdmin
Connect to the browser interface.
Select Add New Server.
Enter the following values:
The value from section 2
5432
immich
immich
The value from section 6
Under Databases select Immich -> right click -> backup.
Select the backup location and click Backup.
In order to connect to the database and perform a backup, we will need login details, the password will appear on the right side together with all the details required to connect to the database
Now go to pgAdmin
Connect to the browser interface.
Select Add New Server.
Enter the following values:
The value that appears in Database Details
5432
immich
immich
The value that appears in Database Details
Under Databases select Immich -> right click -> backup.
Select the backup location and click Backup.
You have successfully backed up your database!
Recovery
If you have suggestions or other ways in which you take a backup, you are welcome to write to me, I will edit accordingly.
Beta Was this translation helpful? Give feedback.
All reactions