Defects arise when nematic liquid crystals are under topological constraints at the boundary. Recently the study of defects has drawn a lot of attention because of the growing theoretical and practical significance. In this paper, we investigate the relationship between two-dimensional defects and three-dimensional defects within nematic liquid crystals confined in a shell. A highly accurate spectral method is used to solve the Landau-de Gennes model to get the detailed static structures of defects. Interestingly, the solution is radial-invariant when the thickness of the shell is sufficiently small. As the shell thickness increases, the solution undergoes symmetry break to reconfigure the disclination lines. We study this three-dimensional reconfiguration of disclination lines in detail under different boundary conditions. In particular, we find that the temperature plays an important role in deciding whether the transition between two-dimensional defects and three-dimensional defects is continuous or discontinuous for the shell with planar anchoring condition on both inner and outer surfaces. We also discuss the characterization of defects in two- and three-dimensional spaces within the tensor model.