Export Mattermost from another location

So I figured out how to do it myself. The solution involves two servers.

  1. On the backup server, ensure there is a running instance of gitlab. This instance will get trashed.

  2. On the backup server, delete the directory /var/opt/gitlab/postgresql
    This action will corrupt gitlab. This is why it must be done on a backup server.

  3. Copy the “restored” data to the backup gitlab server.
    example: cp -ar /RESTORE/var/opt/gitlab/postgresql /var/opt/gitlab

  4. Change ownership if needed to gitlab-psql: sudo chown -R gitlab-psql /var/opt/gitlab/postgresql

  5. Perform gitlab-ctl reconfigure, gitlab-ctl restart.

  6. Log into mattermost. Mattermost will work, but gitlab will not.

  7. Perform a mattermost backup.

  8. From there, I was able to take that backup and restore it on the primary server.