The design of survivable all-optical networks based on self-healing WDM rings (SHR/WDM) to provide 100% protection from any single link failure requires the joint solution of three sub-problems. These are the ring cover of the mesh topology (the RC sub-problem), the routing of working lightpaths between node pairs to support traffic demands (the WL sub-problem) and the selection of the SHR/WDM spare wavelengths for the protection of every link traffic (the SW subproblem). This paper presents an integer linear programming (ILP) formulation of the problem of minimizing the total wavelength mileage (/spl lambda/-miles) required to support a set of given traffic demands in a given network topology using SHR/WDM employing 1:N line protection mechanism (the WRL problem). This formulation allows to jointly and optimally solve the three subproblems, and yields up to 15% reduction of the total /spl lambda/-miles required by existing solutions that separately resolve the sub-problems. A simplified sub-optimal solution of the WRL problem is also provided, that yields results few percent worse than the optimal solution and that is tractable for networks whose size is on the order of the pan-European network, i.e., 19 nodes.