Upgrade 3.4 to 4.4 and backout plan

Built two new test Mongodb environments using replication at release 3.4 to replicate my production environment. I need to upgrade as 3.4 no longer supported.

MongoDB running on local virtual machines on Linux using RHEL 7 and replicate between the two servers.

I upgraded from 3.4 to 3.6, 4.0, 4.2 then 4.4. I took backups with unique names before doing each upgrade and verified things work working proper after each upgrade.

To make sure I have a properly documented backout plan if needed for my production environment, I tried to restore from release 4.4 (or where ever the upgrade it at) to 3.4 using backups since if anything fails the desire is to go back to the beginning and try again later.

I’ve tried using file backups, using mongodump / mongorestore neither which are working.

Under MongoDB Atlas I wouldn’t be able to restore to previous versions.

Does this leave the only option is to follow the manual downgrade process?

A healthy replicaset requires 3 nodes. You’re adding a third right now aren’t you?

These need to be a filesystem snapshot or copied when the mongod is stopped. In my opinion this is the most complete and easiest to restore. What issues are you having?

In the absence of a working backup, yes.

Chris,
In production with have 3 servers. For testing the upgrade and backout plan, we set up only two to simplify the testing.
I will try using the file backups again today. After reloading the files, then starting the primary server then secondary server, an error occurs when entering mongo to access it. I’ll recreate this today and send the exact message.
I was hoping to use mongorestore. I used mongodump when on release 3.4 but no that the environment is on 4.4, it seems the mongorestore is from 4.4 and I need a mongorestore from 3.4

When I tried going back to using release 4.4 (the level before doing a restore), I started getting space related errors. I’ve had to clean up old log files. Since Linux and MongoDB are new to me, this took a little bit to figure out. I have tried so many things, I did an uninstall and now I’m doing the install and upgrade again so I have a clean process to try the file backup from. I’ll update this again when I’m done.

1 Like

The final resolution for this issue was I need to have the binaries in place for the same release in place that was used when the mongodump occurred. Once I had the same release installed, the mongorestore worked since it was for the same major release version.
Thank you.

1 Like