In Wireless Sensor Networks, sensors are used for tracking objects, monitoring health and observing a region/territory for different environmental parameters. Coverage problem in sensor network ensures quality of monitoring a given region. Depending on applications different measures of coverage are there. Barrier coverage is a type of coverage, which ensures all paths that cross the boundary of a region intersect at least one sensor's sensing region. The goal of the sensors is to detect intruders as they cross the boundary or as they penetrate a protected area. The sensors are dependent on their battery life. Restoring barrier coverage on sensor failure using mobile sensors with minimum total displacement is the primary objective of this paper. A centralized barrier coverage restoring scheme is proposed to increase the robustness of the network. We formulate restoring barrier coverage as bipartite matching problem. A distributed restoring of barrier coverage algorithm is also proposed, which restores it by first finding existing alternate barrier. If alternate barrier is not found, an alternate barrier is reconstructed by shifting existing sensors in a cascaded manner. Detailed simulation results are shown to evaluate the performance of our algorithms.