# Databasebestanden zijn incompatibel met de server (bijwerken binnen Linode)

**URL:** https://meta.discourse.org/t/database-files-are-incompatible-with-server-updating-inside-linode/350727
**Category:** Support
**Created:** [5 februari 2025 om 21:22 UTC](https://meta.discourse.org/t/database-files-are-incompatible-with-server-updating-inside-linode/350727 "2025-02-05T21:22:39Z")
**Posts on this page:** 15
**Page:** 1

<div class="post-metadata">

### Author: ![kgreed](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/kgreed/32/168602_2.png) [@kgreed](https://meta.discourse.org/u/kgreed)
#### Post date: [5 februari 2025 om 21:22 UTC](https://meta.discourse.org/t/database-files-are-incompatible-with-server-updating-inside-linode/350727/1 "2025-02-05T21:22:39Z")

</div>

I have the symptoms described at [Error Updating from 3.4.0.beta3-dev to 3.4.0.beta3](https://meta.discourse.org/t/error-updating-from-3-4-0-beta3-dev-to-3-4-0-beta3/349847)  
Only the error is different.

 ![The image shows terminal output indicating various warnings during the process of upgrading PostgreSQL15, including locale-related warnings, file and memory allocation issues, and details about the upgrade process involving the misalignment between the current system setup and the new database version. (Captioned by AI)](https://global.discourse-cdn.com/meta/original/4X/5/d/8/5d896a20a63b2a09960f7dc3f922c89fc86946eb.png)

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [5 februari 2025 om 22:20 UTC](https://meta.discourse.org/t/database-files-are-incompatible-with-server-updating-inside-linode/350727/2 "2025-02-05T22:20:31Z")

</div>

I can’t quote your picture.

But it looks like you need to delete your old postgres\_data\_old directory. If you have space and you’re paranoid, you can rename it.

---

<div class="post-metadata">

### Author: ![kgreed](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/kgreed/32/168602_2.png) [@kgreed](https://meta.discourse.org/u/kgreed)
#### Post date: [6 februari 2025 om 00:04 UTC](https://meta.discourse.org/t/database-files-are-incompatible-with-server-updating-inside-linode/350727/3 "2025-02-06T00:04:02Z")

</div>

> [@pfaffman](#):
>
> I can’t quote your picture.

I cant figure out how to copy the weblish screen output

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [6 februari 2025 om 00:17 UTC](https://meta.discourse.org/t/database-files-are-incompatible-with-server-updating-inside-linode/350727/4 "2025-02-06T00:17:25Z")

</div>

> [@pfaffman](#):
>
> it looks like you need to delete your old postgres\_data\_old directory

This is the salient part of my message.

Maybe first check that it’s old

```
 ls -l /var/discourse/shared/standalone/

```

and make sure that that backup directory is not dated today.

If you have plenty of disk space you can do something like

```plaintext
cd /var/discourse
cd shared/standalone
mv postgres_data_old postgres_data_delete_me

```

and then try again

---

<div class="post-metadata">

### Author: ![kgreed](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/kgreed/32/168602_2.png) [@kgreed](https://meta.discourse.org/u/kgreed)
#### Post date: [6 februari 2025 om 00:58 UTC](https://meta.discourse.org/t/database-files-are-incompatible-with-server-updating-inside-linode/350727/5 "2025-02-06T00:58:43Z")

</div>

No joy.  
I think I am duplicating [Upgrade failed spectacularily](https://meta.discourse.org/t/upgrade-failed-spectacularily/350773)

---

<div class="post-metadata">

### Author: ![mwaniki](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mwaniki/32/313097_2.png) [@mwaniki](https://meta.discourse.org/u/mwaniki)
#### Post date: [6 februari 2025 om 06:41 UTC](https://meta.discourse.org/t/database-files-are-incompatible-with-server-updating-inside-linode/350727/6 "2025-02-06T06:41:30Z")

</div>

Could you share contents of your `app.yml` file? Redact any sensitive information before posting.

---

<div class="post-metadata">

### Author: ![kgreed](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/kgreed/32/168602_2.png) [@kgreed](https://meta.discourse.org/u/kgreed)
#### Post date: [6 februari 2025 om 08:00 UTC](https://meta.discourse.org/t/database-files-are-incompatible-with-server-updating-inside-linode/350727/8 "2025-02-06T08:00:57Z")

</div>

from root@localhost: /var/discourse/containers

```plaintext
## this is the all-in-one, standalone Discourse Docker container template
##
## After making changes to this file, you MUST rebuild
## /var/discourse/launcher rebuild app
##
## BE *VERY* CAREFUL WHEN EDITING!
## YAML FILES ARE SUPER SUPER SENSITIVE TO MISTAKES IN WHITESPACE OR ALIGNMENT!
## visit http://www.yamllint.com/ to validate this file as needed

templates:
  - "templates/postgres.template.yml"
  - "templates/redis.template.yml"
  - "templates/web.template.yml"
  - "templates/web.ratelimited.template.yml"
## Uncomment these two lines if you wish to add Lets Encrypt (https)
  - "templates/web.ssl.template.yml"
  - "templates/web.letsencrypt.ssl.template.yml"

## which TCP/IP ports should this container expose?
## If you want Discourse to share a port with another webserver like Apache or nginx,
## see https://meta.discourse.org/t/17247 for details
expose:
  - "80:80" # http
  - "443:443" # https

params:
  db_default_text_search_config: "pg_catalog.english"

  ## Set db_shared_buffers to a max of 25% of the total memory.
  ## will be set automatically by bootstrap based on detected RAM, or you can override
  db_shared_buffers: "256MB"

  ## can improve sorting performance, but adds memory usage per-connection
  #db_work_mem: "40MB"

  ## Which Git revision should this container use? (default: tests-passed)
  #version: tests-passed

env:
  LANG: en_US.UTF-8
  # DISCOURSE_DEFAULT_LOCALE: en

  ## How many concurrent web requests are supported? Depends on memory and CPU cores.
  ## will be set automatically by bootstrap based on detected CPUs, or you can override
  UNICORN_WORKERS: 4

  ## TODO: The domain name this Discourse instance will respond to
  DISCOURSE_HOSTNAME: <mydomain>

  ## Uncomment if you want the container to be started with the same
  ## hostname (-h option) as specified above (default "$hostname-$config")
  #DOCKER_USE_HOSTNAME: true

  ## TODO: List of comma delimited emails that will be made admin and developer
  ## on initial signup example 'user1@example.com,user2@example.com'
  DISCOURSE_DEVELOPER_EMAILS: <myemail>

  ## TODO: The SMTP mail server used to validate new accounts and send notifications
  DISCOURSE_SMTP_ADDRESS: <mymailorg>
  DISCOURSE_SMTP_PORT: <myport>
  DISCOURSE_SMTP_USER_NAME: <mysmpremail>
  DISCOURSE_SMTP_PASSWORD: <mypassword>
  #DISCOURSE_SMTP_ENABLE_START_TLS: true # (optional, default true)

  ## If you added the Lets Encrypt template, uncomment below to get a free SSL certificate
  LETSENCRYPT_ACCOUNT_EMAIL: <myemail>

  ## The CDN address for this Discourse instance (configured to pull)
  ## see https://meta.discourse.org/t/14857 for details
  #DISCOURSE_CDN_URL: //discourse-cdn.example.com

## The Docker container is stateless; all data is stored in /shared
volumes:
  - volume:
      host: /var/discourse/shared/standalone
      guest: /shared
  - volume:
      host: /var/discourse/shared/standalone/log/var-log
      guest: /var/log

## Plugins go here
## see https://meta.discourse.org/t/19157 for details
hooks:
  after_code:
    - exec:
        cd: $home/plugins
        cmd:
          - git clone https://github.com/discourse/docker_manager.git
          - git clone https://github.com/discourse/discourse-solved.git
          - git clone https://github.com/discourse/discourse-math.git

## Any custom commands to run after building
run:
  - exec: echo "Beginning of custom commands"
  ## If you want to set the 'From' email address for your first registration, uncomment and change:
  ## After getting the first signup email, re-comment the line. It only needs to run once.
  #- exec: rails r "SiteSetting.notification_email='info@unconfigured.discourse.org'"
  - exec: echo "End of custom commands"
 

```

---

<div class="post-metadata">

### Author: ![mwaniki](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mwaniki/32/313097_2.png) [@mwaniki](https://meta.discourse.org/u/mwaniki)
#### Post date: [6 februari 2025 om 08:51 UTC](https://meta.discourse.org/t/database-files-are-incompatible-with-server-updating-inside-linode/350727/10 "2025-02-06T08:51:06Z")

</div>

Could you confirm your Docker version? If you’re on an older version than our recommended version `24.0.7`, I would suggest that you update Docker then try again.

There were similar issues reported in a separate topic and it appears that updating Docker resolved the issue there.

> [@Postgres error upgrading from 3.3 to 3.4 caused by locale issues](https://meta.discourse.org/t/postgres-error-upgrading-from-3-3-to-3-4-caused-by-locale-issues/345185):
>
> Hi Happy New Year to all. I am trying to update from 3.3 b10 to 3.4 b3. I did the following: cd /var/discourse/git git remote update git pull --rebase origin main Then I did the standard ./launcher rebuild app. I am running Ubuntu 20.04 with Docker 20.10.7. I understand the Docker version is deprecated but the issues seem to come from the Postgre container. I’m getting the following locale error: Stopping old container + /usr/bin/docker stop -t 600 app app 2.0.20241203-0251: Pulling from d…

---

<div class="post-metadata">

### Author: ![kgreed](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/kgreed/32/168602_2.png) [@kgreed](https://meta.discourse.org/u/kgreed)
#### Post date: [6 februari 2025 om 09:19 UTC](https://meta.discourse.org/t/database-files-are-incompatible-with-server-updating-inside-linode/350727/11 "2025-02-06T09:19:44Z")

</div>

Docker version 20.10.7, build f0df350

```plaintext
cat /etc/os-release
NAME="Ubuntu"
VERSION="16.04.7 LTS (Xenial Xerus)"

```

---

<div class="post-metadata">

### Author: ![mwaniki](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mwaniki/32/313097_2.png) [@mwaniki](https://meta.discourse.org/u/mwaniki)
#### Post date: [6 februari 2025 om 09:29 UTC](https://meta.discourse.org/t/database-files-are-incompatible-with-server-updating-inside-linode/350727/12 "2025-02-06T09:29:02Z")

</div>

Seems like you may be experiencing a similar Docker issue to the one reported in that other topic.

I suggest that you update both Ubuntu and Docker to more recent versions then try rebuilding again.

If your old `app` container still exists, and you have not modified the existing data files in `shared/standalone/postgres_data`, you may try running `./launcher start app` to start the site on the old container in the meantime.

---

<div class="post-metadata">

### Author: ![kgreed](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/kgreed/32/168602_2.png) [@kgreed](https://meta.discourse.org/u/kgreed)
#### Post date: [6 februari 2025 om 10:18 UTC](https://meta.discourse.org/t/database-files-are-incompatible-with-server-updating-inside-linode/350727/14 "2025-02-06T10:18:26Z")

</div>

I went through steps to update Ubuntu and finally pressed on this.

 ![The image is a screenshot of a terminal showing an error message about the obsolete PostgreSQL version 9.5 and instructions on how to upgrade. (Captioned by AI)](https://global.discourse-cdn.com/meta/original/4X/9/9/c/99cb97c80e06c62249090c054b037aae68447918.png)  
But the screen has locked up at  
 ![The image displays the outputs of package installation processes on a Linux system, showing various packages being set up and installed, including systemd, mimeme-support, libxslt, xorg-driver-generic, libcap-ng1-dev, dbus-client, and PostgreSQL. (Captioned by AI)](https://global.discourse-cdn.com/meta/original/4X/2/6/b/26b5a77913d8ea1e86ebee02d8d90ffe798a0cb1.png)

Re connecting I see I have Ubuntu 18.0.4.6 LTS (Bionic Beaver)

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [6 februari 2025 om 15:59 UTC](https://meta.discourse.org/t/database-files-are-incompatible-with-server-updating-inside-linode/350727/15 "2025-02-06T15:59:31Z")

</div>

It’ll be much easier if you create a new VM with an up-to-date OS. 18.04 is beyond end of life and 20.04 runs out in April.

If you have an up-to-date backup, create a new server, and restore that backup, completely avoiding the postgres upgrade issues.

> [@kgreed](#):
>
> I went through steps to update Ubuntu and finally pressed on this [postgres update]

Discourse doesn’t need postgres installed on the OS. This is another reason to start with a fresh OS.

---

<div class="post-metadata">

### Author: ![kgreed](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/kgreed/32/168602_2.png) [@kgreed](https://meta.discourse.org/u/kgreed)
#### Post date: [6 februari 2025 om 20:11 UTC](https://meta.discourse.org/t/database-files-are-incompatible-with-server-updating-inside-linode/350727/16 "2025-02-06T20:11:21Z")

</div>

Thanks Jay  
I have been able to restore a backup linode to another linode (linode2)  
Now I need to open Discourse on linode2 so that I can get Discourse to email me a backup.  
I made a new DNS setting for linode2 but I get 502 Bad Gateway when I go there.  
Perhaps I have to wait a while?  
Strangely [discbak.softwarebydesign.com.au](https://diskbak.softwarebydesign.com.au) (linode2) is currently re-routing to discourse.softwarebydesign.com.au (on the original linode)

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [6 februari 2025 om 20:17 UTC](https://meta.discourse.org/t/database-files-are-incompatible-with-server-updating-inside-linode/350727/17 "2025-02-06T20:17:06Z")

</div>

You can copy the backup with scp/rsync. It’s easier and faster (unless you don’t know what that means).

You really want to create a **new** VM with a new OS (not a backup of a server with an out-of-date os) and move to it as described at [Move a Discourse site to another VPS with rsync](https://meta.discourse.org/t/move-a-discourse-site-to-another-vps-with-rsync/43812). The one that I just copied also had some ownership issues. You probably will too.

> [@kgreed](#):
>
> Strangely discbak.softwarebydesign.com.au (linode2) is currently re-routing to discourse.softwarebydesign.com.au (on the original linode)

If discbak is running the same image as the other server, I’d expect it to give you a certificate error (unless you visited `http://`) and then redirect to whatever is in HOSTNAME.

---

<div class="post-metadata">

### Author: ![kgreed](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/kgreed/32/168602_2.png) [@kgreed](https://meta.discourse.org/u/kgreed)
#### Post date: [6 februari 2025 om 21:24 UTC](https://meta.discourse.org/t/database-files-are-incompatible-with-server-updating-inside-linode/350727/18 "2025-02-06T21:24:53Z")

</div>

> [@pfaffman](#):
>
> unless you don’t know what that means

It is fair to say that I don’t really know what I am doing.  
I have created a new VPS running Ubunto 24.0.1 LTS and am up to the instruction to

```plaintext
rsync -rvz example.com:/var/discourse /var

```

Due to my failed upgrade, [example.com](http://example.com) gives 502 bad gateway.  
I am on a learning curve trying to figure out how to grant access anyway.
