emielregis
IImmich
•Created by emielregis on 4/14/2025 in #help-desk-support
Postgres errors when restoring
The correct sed is
sed 's/\r\r$//g'
The restore command would be:
38 replies
IImmich
•Created by emielregis on 4/14/2025 in #help-desk-support
Postgres errors when restoring
You're right, using dos2unix is probably not a great workaround to fix just two instances of rogue carriage returns. Hopefully this bug can be tracked down and the root cause can be fixed eventually.
38 replies
IImmich
•Created by emielregis on 4/14/2025 in #help-desk-support
Postgres errors when restoring
It was indeed some shenanigans with carriage return and newline, though I'm not quite sure what exactly. Here is the command that worked.
Note the pipe to
dos2unix
38 replies
IImmich
•Created by emielregis on 4/14/2025 in #help-desk-support
Postgres errors when restoring
38 replies
IImmich
•Created by emielregis on 4/14/2025 in #help-desk-support
Postgres errors when restoring
It's clearly these two lines in the dump that's causing the issues. I'll continue investigating this tomorrow.
38 replies
IImmich
•Created by emielregis on 4/14/2025 in #help-desk-support
Postgres errors when restoring
I am just testing my backups on a different Linux machine, so the real risk is minimal tbh. I think I'll edit the dump directly if needed.
38 replies
IImmich
•Created by emielregis on 4/14/2025 in #help-desk-support
Postgres errors when restoring
My bad. You probably meant to ask me to inspect the stream going to the docker exec command to figure out the correct
sed
. I'll give it a try.38 replies
IImmich
•Created by emielregis on 4/14/2025 in #help-desk-support
Postgres errors when restoring
Did not work. I tried this from within the container
Same error.
38 replies
IImmich
•Created by emielregis on 4/14/2025 in #help-desk-support
Postgres errors when restoring
Do you mean map the folder containing the dump to the docker container, then execute
cat dump.sql | sed <stuff> | psql --dbname=postgres --username=postgres
?
I can try that.38 replies
IImmich
•Created by emielregis on 4/14/2025 in #help-desk-support
Postgres errors when restoring
38 replies
IImmich
•Created by emielregis on 4/14/2025 in #help-desk-support
Postgres errors when restoring
The same one, somehow.
38 replies
IImmich
•Created by emielregis on 4/14/2025 in #help-desk-support
Postgres errors when restoring
Sorry, my bad; I did catch that. I was aware that you have to use single quotes with sed if using
sed 's...g'
syntax. I did use a broken 'sed' the first time, and copied the wrong command from my bash history here. Sorry about the confusion.
Anyway, I used the command you suggested above and still got the error.
38 replies
IImmich
•Created by emielregis on 4/14/2025 in #help-desk-support
Postgres errors when restoring
Mert suggested replacing
\r\r\n
with \n
but it did not get rid of the error message either. Here is the command I tried:
Note the additional pipe to sed: sed "s.\\r\\r\\n.\\n.g"
38 replies
IImmich
•Created by emielregis on 4/14/2025 in #help-desk-support
Postgres errors when restoring
Yeah, I saw this. There wasn't a resolution on the GitHub thread. Again, the restore seems to have worked, but I'm concerned there may be issues down the line that I may be missing at the moment.
38 replies
IImmich
•Created by emielregis on 4/14/2025 in #help-desk-support
Postgres errors when restoring
Postgres version is
docker.io/tensorchord/pgvecto-rs:pg14-v0.2.0
The database and backup both live in local btrfs filesystems.
There are no checksum errors.
38 replies
IImmich
•Created by emielregis on 4/14/2025 in #help-desk-support
Postgres errors when restoring
.env file:
38 replies
IImmich
•Created by emielregis on 4/14/2025 in #help-desk-support
Postgres errors when restoring
38 replies
IImmich
•Created by emielregis on 4/14/2025 in #help-desk-support
Postgres errors when restoring
Docker Compose file:
38 replies
IImmich
•Created by razormy on 2/11/2025 in #help-desk-support
iPhone to Immich: One-Way Sync Help
*Make sure you delete photos from your phone's built-in gallery app, and not Immich. Deleting from Immich will delete the copy on your server.
7 replies
IImmich
•Created by Kordek on 2/3/2025 in #help-desk-support
2 step verification
Among the many options, the easiest may be Google Oauth. You can then sign in using your google account, which you may set up with 2-factor authentication.
6 replies