How can we restore backups without getting rid of newly installed apps on same site?

We have deployed ERP Next in Production successfully using Docker as per the official recommendation. We have also added custom apps to the same site by creating custom image as per documentation.

Following is the issue we are facing: we have taken backups of our site using bench backup. However, after that point, we realised the need of another app, for which we created another custom image. After deploying the new custom image, we restored latest backup using bench restore, however, we realised that our newly installed app was removed along with data being restored. Viewing the docs, apparently this behavior is intentional.

Due to this, as per our understanding, we seem to be stuck in a Catch-22 where for a particular site, we can either restore our data and lose the newly added apps, or lose the data (and tediously manually import it) if we want the new apps. Please help us understanding the gaps in our understanding, if any, and the recommended way to ensure adding new apps while ensuring our data stays intact.

I suggest pushing your newly created app to a github repo, restore your site, then use bench get-app to copy your app from github, then use bench --site ‘your-site-name’ ‘app-name’ to install it

Hi,I remember seeing in the documentation somewhere that bench get-app does not work in running containers, so I don’t think this is a viable approach.