'How can I retrieve compose files for stacks deployed before the current Portainer install?

I made an error and wiped my Portainer data on my Ubuntu PC. After I reinstalled it, I noticed that the other stacks that were still running now showed as limited control in Portainer. Even worse, I can't view/edit their compose configs.

Is there anyway to extract compose info from a stack previously deployed before the current Portainer container?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source