'is there a way to retain docker swarm services when network is deleted and recreated

I might be thinking something absurd. Not exactly sure, But is there a way to retain all docker swarm services of network and deploy them in new network at reboot.

I have a condition where some of my services are getting affected at reboot, My docker swarm services up ready and working fine as my docker daemon restart, however they are not online due to network error.

Something similar to this - https://github.com/moby/moby/issues/38318

To deal with it, I thought of deleting the old container network and creating new one, however my services are not there anymore. is there a way to retain it.



Sources

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

Source: Stack Overflow

Solution Source