I had some files on a server. Then I installed a rpm package that have same files in it. As a result, rpm package overwrite these files and I lost my newly edited files. I wonder if there is a way to recover/restore these files via rpm capabilities?
rpm does not create backups of files that are not marked as configuration files, so the changes are lost. However, rpm also won't overwrite files that exist in the rpmdb but have a different signature, and will refuse to install the package unless forced.