devops – Is there any way to create the deleted network in Docker swarm with old Network ID?

We are running Docker swarm with 1 manager and 6 worker nodes . Somehow the containers on all the nodes were stopped and swarm network got deleted. Basically the containers are now residing with the old network name and Network id.

Steps taken to solve the issue: Create the new swarm attachable network with the same name as before with below command.

docker network create –driver overlay –scope swarm –attachable –subnet 192.168.50.50/24 XXXXXX NW got created with same name but with new Network ID

When tried to start the containers its getting fail as its looking for old Network with old network id.

Error response from Daemon : Could not attach to network XXXXXX : rpc error:code =Not found desc = Network XXXXX not found. Error: failed to start container

So, is there any way to assign the old network id to the newly created network with the same name as before.