In this post, I will explain how I restored .repo files which I accidentally wiped off.
Yum is the package manager in Centos, Fedora and Rhel. It actually goes through the .repo file in /etc/yum.repos.d . Yum downloads and install the packages.
It contains yum configuration files with .repo extension. These .repo files contains the URL to the servers where to fetch the packages. Not only remote(HTTP,FTP..) but also can contain local(ie., local packages in your disk) repositories.
Okay, that's the basics.
I copied those files over ssh from similar system running.
It's a simple command.
sudo su - scp /etc/yum.repos.d/* firstname.lastname@example.org:/etc/yum.repos.d
scp source_username@source_ip:filename destination_username@destination_ip:filename
Pre-requsite: Both the systems must be connected over SSH before copying.