The paper focuses on the efficient dynamic routing of unicast and data center (dc)-related requests in elastic optical networks (eons) implementing software-defined networking (sdn) and intend-based networking (ibn) paradigms. To improve the network performance (measured as a ratio of the accepted traffic), we apply the service relocation (i.e., the adaptive process of changing the assigned dc for an anycast request). To enable a realistic case study, we propose a novel traffic model for dc-oriented and intent-based transport networks. The model reflects patterns observed in real networks and relates them with the economic and demographic parameters of the cities associated with network nodes. Then, we propose a dedicated allocation algorithm and introduce 21 different service relocation policies. These are traffic- and network-aware approaches, which use three data types for decision-making — traffic prediction, bit-rate rejection history, and topological network characteristics. Finally, we perform extensive simulations to: (i) tune the proposed optimization approaches, (ii) compare their efficiency and select the best one, (iii) determine benefits provided by the traffic- and network-aware service relocation in sdn/ibn optical networks. The results prove a high efficiency of the proposed policies, which allowed to serve up to 5.39% more traffic compared to the network with the fixed dc assignment. They also reveal that the most efficient policy makes its decisions based on traffic prediction.