Restore/Reinstall installed software on yum / rpm based distros

This is how to restore installed software:

$ rpm -qa > /backup/installed-software.log
$ yum install $(cat /backup/installed-software.log) 

Usecases may be a complete system restore or install a second computer with the same software as the first one.

Found on http://www.cyberciti.biz.