Product SiteDocumentation Site

5.16.3. Corrupt History

It is possible to corrupt the history database, and in such cases you may see something like:
# yum history info 10
...		
Transaction ID : 10
Initial date     : Fri Nov 27 12:34:18 2009
Initla Rpmdb     : 2005:ea899bf5e2243b770e23188d4dccbb78b4fe96b4
Final date       :             12:34:54 2009 (36 segundos)
Final Rpmdb      : 2011:0edcefb8dd72a2b498a1dadc6dc89478bb8a1a85
User            : Traceback (most recent call last):
  File "/usr/bin/yum", line 29, in <module>
    yummain.user_main(sys.argv[1:], exit_code=True)
    ...
At the time of writing there is not a known method for restoring it, so it is advisable to keep a backup of the file containing the history. If you do not have a backup you must create a new file for the history.
# yum history new
...
history new
When creating a new history, the older one is not really lost, and for hackers, these files are Sqlite3 databases. Anyway, this database consists of only one file, and making a backup in a safe place is an easy task.
# cd /var/lib/yum/history
# ls -l
total 416
-rw-r--r-- 1 root root 407552 nov 27 12:34 history-2009-11-25.sqlite
-rw-r--r-- 1 root root  11264 nov 27 22:40 history-2009-11-27.sqlite