I’ve had a couple of restores/upgrades fail during migration due to space, in spite of there being multiple GB of space remaining (like Restore fails due to disk space on migration).
Might doing a vacuum before backup help out with that issue?
Also
That’s
discourse=# VACUUM FULL ANALYZE;