In order to save space, I don't backup /usr
(except /usr/local
), /bin
, /sbin
and /lib
. Instead I do a rpm -qa --qf '%{NAME}\n'
to get a list of packages I need to install to restore the content of these directories.
When doing a bare-metal recovery, after installing a minimal CentOS system, I install the packages in the list with yum.
Next step is to restore /etc, but here there is a problem: The packages I have just installed may be a newer version than those who were present on my old system when I created the backup. Thus, copying over my old /etc could break things, if configuration formats meanwhile has changed, or make my installation less secure, if important configuration directives has been added in the meantime. Checking every single configuration file is an option, but I would rather avoid it. Could it be done in a more automated fashion?