Backing up Discourse with RDS
We are launching a community site with Discourse at CircleCI and I ran into some issues with performing backups.
Since we want to be #webscale, rather than installing Discourse using the easy Docker method, we opted to split up the services on AWS.
We are using EC2, RDS, ElasticCache, ELB and S3 for backups. When I initially launched PostgreSQL on RDS I just picked the latest version (9.4 at time of writing) and didn’t put much thought into it. The problem is that the version of pg_dump inside the Docker container provided by Discourse is 9.3. Apparently you are not able to do a pg_dump when your client and server are mismatched.
When you try to do this, you get a sad error that states:
aborting because of server version mismatch
In order to fix this, we need to upgrade the client version on the Docker container (or alternatively avoid this all together by using the same version of PostgreSQL on RDS). Since it is easier to update the client than downgrade RDS, I opted to upgrade the client.
To do this:
- Log into the EC2 Instance that is running Discourse
- Go to the Discourse install location (mine is in /var/docker)
- Enter the container with:
sudo ./launcher enter app - Upgrade the version of PostgreSQL client
apt-get install postgresql-9.4 - Swap out the pg_dump symbolic link for the newer version
ln -s /usr/lib/postgresql/9.4/bin/pg_dump /usr/bin/pg_dump - Perform your backup
Thank you for reading! Share your thoughts with me on bluesky, mastodon, or via email.
Check out some more stuff to read down below.
Most popular posts this month
- Great Lakes, Illinois
- My Custom Miniflux CSS Theme
- Are we inside a Sarlacc?
- Setting up ANTLR4 on Windows
- Microblog
Recent Favorite Blog Posts
This is a collection of the last 8 posts that I bookmarked.
- Grow, Like a Tree Not a Cancer from Jim Nielsen’s Blog
- Pluralistic: All the books I reviewed in 2025 (02 Dec 2025) from Pluralistic: Daily links from Cory Doctorow
- DEP-18: A proposal for Git-based collaboration in Debian from Optimized by Otto
- [RIDGELINE] No Phones in The Ten-don Shop from Craig Mod — Writer + Photographer
- My next chapter with Mastodon from Mastodon Blog
- How many pillars of observability can you fit on the head of a pin? from charity.wtf
- The Software Essays that Shaped Me from Refactoring English
- Give Your Spouse the Gift of a Couple's Email Domain from mtlynch.io
Articles from blogs I follow around the net
Yearn Finance suffers fourth exploit only weeks after third
Only weeks after losing $6.6 million to an infinite mint exploit, a Yearn Finance smart contract has again been exploited, allowing an attacker to make off with around 103 ETH (~$300,000). The affected contract is a legacy contract t…
via Web3 is Going Just Great December 17, 202520,000 issues on GitHub
The curl project moved over its source code hosting to GitHub in March 2010, but we kept the main bug tracker running like before – on Sourceforge. It took us a few years, but in 2015 we finally ditched the Sourceforge version fully. We adopted and switch…
via daniel.haxx.se December 16, 2025Issue 98 – The world’s most corrupt crypto startup operation
Terra’s Do Kwon gets 15 years, crypto banks get the green light, and the Trump family’s crypto grift expands even as one of their treasury companies goes off the rails
via Citation Needed December 16, 2025Generated by openring