Here’s the situation: We had a power outage. Our server got hosed. The backup team attempted to restore but it is still hosed. But, they can restore the data on the server but put it in another location (e.g. /RESTORE).
I understand how to do a normal export of the data, but that involves everything operating as normal. But this is not normal conditions.
I tried running the command to export the data: sudo -H -u mattermost bash -c '/RESTORE/opt/gitlab/embedded/bin/pg_dump -U gitlab_mattermost -h /RESTORE/var/opt/gitlab/postgresql -p 5432 mattermost_production > /tmp/mattermost_production.sql'
But it says it requires server running and accepting connections.
So how do I export this data at this other location? I’m sure there’s some command to get this /RESTORE database started so the export can take place, but I don’t know what it is.
I looked into that before and I don’t think it works for the situation I’m in. That looks like it works during normal operations. So on the same server, I already have mattermost running, but it is pretty much empty (from scratch), and I have a backup copy of all the files from the same server placed in another directory. From there, I want to be able to export THAT particular instance of mattermost and restore it on the mattermost current up and running. I just don’t know how to access the database because normally, gitlab-ctl controls that.
If I just copy over a certain directory, will that work?