YunoHost-Apps / mastodon_ynh

Free, open-source social network for YunoHost
https://joinmastodon.org/
GNU Affero General Public License v3.0
85 stars 36 forks source link

Restore From Backup PSQL Error #469

Open lehitoskin opened 1 month ago

lehitoskin commented 1 month ago

Describe the bug

I am restoring the mastodon app from a tarball backup, but it fails because it doesn't believe psql is running, even though it definitely is.

Context

Steps to reproduce

Expected behavior

The app is restored from the backup that YunoHost itself made.

Logs

https://paste.yunohost.org/raw/igeqanevor

lehitoskin commented 1 month ago

After looking a little further, this bit at the end of the log stood out to me:

WARNING - psql: error: could not connect to server: No such file or directory
WARNING -   Is the server running locally and accepting
WARNING -   connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?

The postgresql service seems to fail during the backup restore process and, sure enough, when I run sudo yunohost service status postgresql the it says "status: failed" and needs to be manually restarted.

lehitoskin commented 1 month ago

I don't know why, but after attempting a fresh install of the mastodon app --- which failed --- I ran the restore command again and it went through successfully. 😭