# Migration 29 (Postgresql 13 -\> 15) failed after upgrade to Yunohost 12

**URL:** https://forum.yunohost.org/t/migration-29-postgresql-13-15-failed-after-upgrade-to-yunohost-12/35825
**Category:** Support
**Tags:** migration, bookworm, english
**Created:** [March 8, 2025, 5:10pm UTC](https://forum.yunohost.org/t/migration-29-postgresql-13-15-failed-after-upgrade-to-yunohost-12/35825 "2025-03-08T17:10:50Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![matalb](https://forum.yunohost.org/letter_avatar_proxy/v4/letter/m/fbc32d/32.png) [@matalb](https://forum.yunohost.org/u/matalb)
#### Post date: [March 8, 2025, 5:10pm UTC](https://forum.yunohost.org/t/migration-29-postgresql-13-15-failed-after-upgrade-to-yunohost-12/35825/1 "2025-03-08T17:10:50Z")

</div>

**What type of hardware are you using** : VPS bought online  
**What YunoHost version are you running** : 12.0.11  
**How are you able to access your server** : The webadmin  
**Are you in a special context or did you perform specific tweaking on your YunoHost instance ?** : no

### Describe your issue

After running the migration Yunohost 11 → 12 and the post-uprade migrations, migration 29 (Postgreqsl 13 → 15) fails and is never ending.

The log shows some localized messages concerning no disk space available, but I checked with df that 27.6GB free disk space is available.

Originally I wrote this at the end of my first post ([Upgrade to Yunohost 12 failed with unspecific error - #26 by matalb](https://forum.yunohost.org/t/upgrade-to-yunohost-12-failed-with-unspecific-error/35800/26)), but this new post has a specific title and I hope for specific help.

Since I don’t undestand the messages, I hope there will be some help with that. Any help is appreciated!

### Share relevant logs or error messages

Migration log: [https://paste.yunohost.org/raw/zivomoveju](https://paste.yunohost.org/raw/zivomoveju)

---

<div class="post-metadata">

### Author: ![jarod5001](https://forum.yunohost.org/user_avatar/forum.yunohost.org/jarod5001/32/5323_2.png) [@jarod5001](https://forum.yunohost.org/u/jarod5001)
#### Post date: [March 8, 2025, 6:17pm UTC](https://forum.yunohost.org/t/migration-29-postgresql-13-15-failed-after-upgrade-to-yunohost-12/35825/2 "2025-03-08T18:17:17Z")

</div>

Can you share the content of /var/log/postgresql/pg\_upgradecluster-13-15-main.dw7h

What’s the output of `du -sh /var/lib/postgresql/13/main `?

---

<div class="post-metadata">

### Author: ![matalb](https://forum.yunohost.org/letter_avatar_proxy/v4/letter/m/fbc32d/32.png) [@matalb](https://forum.yunohost.org/u/matalb)
#### Post date: [March 8, 2025, 6:39pm UTC](https://forum.yunohost.org/t/migration-29-postgresql-13-15-failed-after-upgrade-to-yunohost-12/35825/3 "2025-03-08T18:39:46Z")

</div>

The output is:

```auto
51G	/var/lib/postgresql/13/main

```

---

<div class="post-metadata">

### Author: ![matalb](https://forum.yunohost.org/letter_avatar_proxy/v4/letter/m/fbc32d/32.png) [@matalb](https://forum.yunohost.org/u/matalb)
#### Post date: [March 8, 2025, 6:43pm UTC](https://forum.yunohost.org/t/migration-29-postgresql-13-15-failed-after-upgrade-to-yunohost-12/35825/4 "2025-03-08T18:43:59Z")

</div>

```auto
/var/log/postgresql/pg_upgradecluster-13-15-main.dw7h

```

is a directory. Its content is empty.

---

<div class="post-metadata">

### Author: ![jarod5001](https://forum.yunohost.org/user_avatar/forum.yunohost.org/jarod5001/32/5323_2.png) [@jarod5001](https://forum.yunohost.org/u/jarod5001)
#### Post date: [March 8, 2025, 7:58pm UTC](https://forum.yunohost.org/t/migration-29-postgresql-13-15-failed-after-upgrade-to-yunohost-12/35825/5 "2025-03-08T19:58:31Z")

</div>

> [@matalb](#):
>
> `51G	/var/lib/postgresql/13/main`

Your database is 51G large. You need twice that of free space to migrate your database.

A workaround is to set the temporary folder on a larger disk  
`export PGHOST=/path/to/larger/disk/tmp` then rerun the migration

Edit : I have searched how to optimize postgresql database, there are some commands “VACUUM FULL” “ANALYZE” “REINDEX DATABASE”. I didn’t read the whole thing but it is possible to reduce the database size on disk by removing leftovers

---

<div class="post-metadata">

### Author: ![matalb](https://forum.yunohost.org/letter_avatar_proxy/v4/letter/m/fbc32d/32.png) [@matalb](https://forum.yunohost.org/u/matalb)
#### Post date: [March 9, 2025, 11:22am UTC](https://forum.yunohost.org/t/migration-29-postgresql-13-15-failed-after-upgrade-to-yunohost-12/35825/6 "2025-03-09T11:22:29Z")

</div>

Now I have additional disk storage at /mnt/plusdisk via nfs. df shows 104857280 free bytes, although I ordered 250GB. So it’s only almost double of 51G.

Should I try the migration?

---

<div class="post-metadata">

### Author: ![matalb](https://forum.yunohost.org/letter_avatar_proxy/v4/letter/m/fbc32d/32.png) [@matalb](https://forum.yunohost.org/u/matalb)
#### Post date: [March 9, 2025, 11:27am UTC](https://forum.yunohost.org/t/migration-29-postgresql-13-15-failed-after-upgrade-to-yunohost-12/35825/7 "2025-03-09T11:27:38Z")

</div>

I managed to set the quota to 250GB, the maximum. I will run the migration accoring to your recommendation.

---

<div class="post-metadata">

### Author: ![matalb](https://forum.yunohost.org/letter_avatar_proxy/v4/letter/m/fbc32d/32.png) [@matalb](https://forum.yunohost.org/u/matalb)
#### Post date: [March 9, 2025, 11:45am UTC](https://forum.yunohost.org/t/migration-29-postgresql-13-15-failed-after-upgrade-to-yunohost-12/35825/8 "2025-03-09T11:45:54Z")

</div>

I ran this migration command

```auto
sudo mkdir /mnt/plusdisk/tmp
export PGHOST=/mnt/plusdisk/tmp
sudo yunohost tools migrations run

```

which resulted in an error message, here is the log:  
[https://paste.yunohost.org/raw/rucoxigopo](https://paste.yunohost.org/raw/rucoxigopo)

The disk space should be sufficient, `df -h` output:

```auto
myipaddress:/voln353211a2 250G 384K 250G 1% /mnt/plusdisk

```

---

<div class="post-metadata">

### Author: ![jarod5001](https://forum.yunohost.org/user_avatar/forum.yunohost.org/jarod5001/32/5323_2.png) [@jarod5001](https://forum.yunohost.org/u/jarod5001)
#### Post date: [March 9, 2025, 12:12pm UTC](https://forum.yunohost.org/t/migration-29-postgresql-13-15-failed-after-upgrade-to-yunohost-12/35825/9 "2025-03-09T12:12:56Z")

</div>

`Error: could not stop old cluster, please do that manually `  
Try to stop postgresql 13 before running the migration

---

<div class="post-metadata">

### Author: ![matalb](https://forum.yunohost.org/letter_avatar_proxy/v4/letter/m/fbc32d/32.png) [@matalb](https://forum.yunohost.org/u/matalb)
#### Post date: [March 9, 2025, 12:38pm UTC](https://forum.yunohost.org/t/migration-29-postgresql-13-15-failed-after-upgrade-to-yunohost-12/35825/10 "2025-03-09T12:38:38Z")

</div>

With which command?

---

<div class="post-metadata">

### Author: ![jarod5001](https://forum.yunohost.org/user_avatar/forum.yunohost.org/jarod5001/32/5323_2.png) [@jarod5001](https://forum.yunohost.org/u/jarod5001)
#### Post date: [March 9, 2025, 1:35pm UTC](https://forum.yunohost.org/t/migration-29-postgresql-13-15-failed-after-upgrade-to-yunohost-12/35825/11 "2025-03-09T13:35:58Z")

</div>

```auto
systemctl stop postgresql.service
systemctl stop postgresql@13-main.service

```

---

<div class="post-metadata">

### Author: ![matalb](https://forum.yunohost.org/letter_avatar_proxy/v4/letter/m/fbc32d/32.png) [@matalb](https://forum.yunohost.org/u/matalb)
#### Post date: [March 9, 2025, 2:32pm UTC](https://forum.yunohost.org/t/migration-29-postgresql-13-15-failed-after-upgrade-to-yunohost-12/35825/12 "2025-03-09T14:32:39Z")

</div>

The same result, I tried three times obeying your recommendations, checking PGHOST and df.

Here is the last log:

[https://paste.yunohost.org/raw/punomuxeva](https://paste.yunohost.org/raw/punomuxeva)

What seems wrong: the logs are in /var/log/postgresql/pg\_upgradecluster-13-15-main.0YZD, which is empty.

I wonder what I am doing wrong…

---

<div class="post-metadata">

### Author: ![matalb](https://forum.yunohost.org/letter_avatar_proxy/v4/letter/m/fbc32d/32.png) [@matalb](https://forum.yunohost.org/u/matalb)
#### Post date: [March 9, 2025, 3:19pm UTC](https://forum.yunohost.org/t/migration-29-postgresql-13-15-failed-after-upgrade-to-yunohost-12/35825/13 "2025-03-09T15:19:40Z")

</div>

I am trying to undestand the logfile better. I improved it by replacing all \n with \n in gedit.

The first error message is:

```auto
Copying
  user relation files                                 
Fehler beim Kopieren von Relation
  \xc2\xbbpublic.state_groups_state_type_idx\xc2\xab: konnte Datei \xc2\xbb/var/lib/postgresql/15/main/base/16401/17779.1\xc2\xab
  nicht schreiben: Auf dem Ger\xc3\xa4t ist kein Speicherplatz mehr verf\xc3\xbcgbar
Fehlgeschlagen,
  Programm wird beendet
Cluster is not running.
''

  stderr:

  b''Error: pg_upgrade run failed. Logfiles are in /var/log/postgresql/pg_upgradecluster-13-15-main.0YZD
Error
  during cluster dumping, removing new cluster
Error: could not stop old cluster,
  please do that manually
'

```

That means the first error says, it could not write the file `\xc2\xbb/var/lib/postgresql/15/main/base/16401/17779.1\xc2\xab` because there is no more memory/storage available on the device.

Could not stop the old cluster comes later.

This is all I can do. How can we get more debugging information?

---

<div class="post-metadata">

### Author: ![jarod5001](https://forum.yunohost.org/user_avatar/forum.yunohost.org/jarod5001/32/5323_2.png) [@jarod5001](https://forum.yunohost.org/u/jarod5001)
#### Post date: [March 9, 2025, 3:32pm UTC](https://forum.yunohost.org/t/migration-29-postgresql-13-15-failed-after-upgrade-to-yunohost-12/35825/14 "2025-03-09T15:32:50Z")

</div>

Can you open a second terminal and monitor the disk usage using `df -h` during the migration?

---

<div class="post-metadata">

### Author: ![matalb](https://forum.yunohost.org/letter_avatar_proxy/v4/letter/m/fbc32d/32.png) [@matalb](https://forum.yunohost.org/u/matalb)
#### Post date: [March 9, 2025, 3:46pm UTC](https://forum.yunohost.org/t/migration-29-postgresql-13-15-failed-after-upgrade-to-yunohost-12/35825/15 "2025-03-09T15:46:27Z")

</div>

I even managed the second ssh window. I did `df -h` frequently, the output didn’t change seemingly. Here it is:

```auto
Filesystem Size Used Avail Use% Mounted on
udev 3.9G 0 3.9G 0% /dev
tmpfs 795M 656K 794M 1% /run
/dev/sda3 153G 119G 27G 82% /
tmpfs 3.9G 0 3.9G 0% /dev/shm
tmpfs 5.0M 0 5.0M 0% /run/lock
/dev/sda2 974M 84M 823M 10% /boot
ipaddress:/voln353211a1 250G 73G 178G 30% /mnt/storagespace
ipaddress:/voln353211a1/home/yunohost.backup 250G 73G 178G 30% /home/yunohost.backup
tmpfs 795M 0 795M 0% /run/user/1007
ipaddress:/voln353211a2 250G 384K 250G 1% /mnt/plusdisk

```

The last line is the additional disk.

---

<div class="post-metadata">

### Author: ![matalb](https://forum.yunohost.org/letter_avatar_proxy/v4/letter/m/fbc32d/32.png) [@matalb](https://forum.yunohost.org/u/matalb)
#### Post date: [March 9, 2025, 6:27pm UTC](https://forum.yunohost.org/t/migration-29-postgresql-13-15-failed-after-upgrade-to-yunohost-12/35825/16 "2025-03-09T18:27:45Z")

</div>

So, there is plenty of disk space. The error message is wrong.

I need more detailed error information.

The question is, why is there no logging of the postgresql migration process?

---

<div class="post-metadata">

### Author: ![jarod5001](https://forum.yunohost.org/user_avatar/forum.yunohost.org/jarod5001/32/5323_2.png) [@jarod5001](https://forum.yunohost.org/u/jarod5001)
#### Post date: [March 9, 2025, 7:18pm UTC](https://forum.yunohost.org/t/migration-29-postgresql-13-15-failed-after-upgrade-to-yunohost-12/35825/17 "2025-03-09T19:18:02Z")

</div>

I’m out of ideas may be @Aleks can help here. Sorry to ping you

---

<div class="post-metadata">

### Author: ![matalb](https://forum.yunohost.org/letter_avatar_proxy/v4/letter/m/fbc32d/32.png) [@matalb](https://forum.yunohost.org/u/matalb)
#### Post date: [March 9, 2025, 8:09pm UTC](https://forum.yunohost.org/t/migration-29-postgresql-13-15-failed-after-upgrade-to-yunohost-12/35825/18 "2025-03-09T20:09:59Z")

</div>

Anyway, thank you very much for your frequent and quick help!

---

<div class="post-metadata">

### Author: ![matalb](https://forum.yunohost.org/letter_avatar_proxy/v4/letter/m/fbc32d/32.png) [@matalb](https://forum.yunohost.org/u/matalb)
#### Post date: [March 10, 2025, 8:07am UTC](https://forum.yunohost.org/t/migration-29-postgresql-13-15-failed-after-upgrade-to-yunohost-12/35825/19 "2025-03-10T08:07:20Z")

</div>

Can someone please help and look into this?  
Thank you in advance!

---

<div class="post-metadata">

### Author: ![matalb](https://forum.yunohost.org/letter_avatar_proxy/v4/letter/m/fbc32d/32.png) [@matalb](https://forum.yunohost.org/u/matalb)
#### Post date: [March 10, 2025, 3:07pm UTC](https://forum.yunohost.org/t/migration-29-postgresql-13-15-failed-after-upgrade-to-yunohost-12/35825/20 "2025-03-10T15:07:45Z")

</div>

Help is needed since my Synapse matrix server has not been running for 3 days. Yunohost upgrade is not yet complete.

So far, postgresql and synapse service are not running. Here is the diagnosis output:

[https://paste.yunohost.org/raw/zasapapeyo](https://paste.yunohost.org/raw/zasapapeyo)

@Aleks could you again look into this, please, or someone else?

I would be really grateful if I could repair my Yunohost server so that the upgrade to Yunohost 12 is complete and all services are running again.

[Next page](https://forum.yunohost.org/t/migration-29-postgresql-13-15-failed-after-upgrade-to-yunohost-12/35825.md?page=2)
