On 03-14-2024 07:58AM, Carlos E. R. wrote:
On 2024-03-14 06:01, -pj wrote:
Hi, I am using openSUSE TUmbleweed. What is the general principal and thought/s about recreating the 'index databases' on the machine with (# rpm --rebuilddb)?
Is there another command or systemd service that should be run after this?
Can this cause damage to the existing paths, files or directories already in place? Are there known negative effects of the command?
To me it seems like perhaps a command like 'zypper clean' or 'zypper ref' even though obviously different in what it does. Something of a sort of maintenance procedure of sorts?
Article -> https://en.wikipedia.org/wiki/RPM_Package_Manager#Forks
It is a last resource type of command, used in desperation, when the database is already broken. It only affects the database itself. I don't suppose it can cause damage if run when it is not needed. Damage comes from not being able to fully repair a broken database. Consequences will be rpm not knowing some packages are already installed or not detecting properly what to update; but again, not because the command itself breaks things, but because it fails to repair previous breakage, AFAIK.
If the command fails, there is a periodic backup of the database in /var/adm/backup/rpmdb
Thanks for your response and information on and about this. Before I received your message I proceeded to do the following. Passing 'rpm --rebuilddb' had a seemingly negative consequence. :[ 1. I cloned the existing drive (SSD) to the backup (HDD) and then tested the backup, as far as booting into OS. 2. I then booted into the primary (SSD) OS. Then I passed "# rpm --rebuilddb" It took a couple minutes to complete. NOTE: I *should* have gotten screenshots of the following scenerio. I have since recloned the primary (SSD) drive from backup (HDD). Continue reading - 3. I passed '# rpmconfigcheck' and an error about path (I think) was displayed. I closed the Konsole instance and opened another Konsole instance . Then repassed '# rpmconfigcheck' with no output besides another prompt displayed after (what I assume) completed. So for a moment I assumed things were fine. 5. Then attempted to open a previously known to work application, 'cpupower-gui' from launcher in Plasma with no result. Attempted in Konsole as root with a bunch of python errors resulting. 6. Tried reinstalling all of the installed packages on the machine entirely passing *** zypper in --no-recommends -f $(rpm -q -a --qf '%{NAME} ') *** and the result was like a 'dependency hell' situation if that is the correct term? Things just could not be resolved. Then aborted. ------------------------------------------------------------------------- The 'rpm --rebuilddb' command never displayed out any output so I think that it did not fail? Can you tell me more about the files in /var/adm/backup/rpmdb ? Are they compacted in directory form? Thinkcentre-M57p:/var/adm/backup/rpmdb # ls -lah total 375M drwxr-xr-x 1 root root 262 Mar 14 10:57 . drwx------ 1 root root 42 Feb 2 10:16 .. -rw-r--r-- 1 root root 75M Mar 8 08:18 Packages.db-20240308.gz -rw-r--r-- 1 root root 75M Mar 9 00:15 Packages.db-20240309.gz -rw-r--r-- 1 root root 75M Mar 10 00:45 Packages.db-20240310.gz -rw-r--r-- 1 root root 75M Mar 11 00:09 Packages.db-20240311.gz -rw-r--r-- 1 root root 75M Mar 14 10:57 Packages.db-20240314.gz -rw-r--r-- 1 root root 36 Mar 14 10:57 rpmdb_recent_md5 It seems they are compacted being in .gz format. - Reading here: https://tr.opensuse.org/SDB:RPM_database_corrupted Says "please make a backup of the directory /var/lib/rpm first". So then create directory /var/lib/rpm.backup <- or something like that? A question was asked on the forums by a more advanced user and the specifics of - how to retrieve a backup from /var/adm/backup/rpmdb was not discussed. Last thread -> https://forums.opensuse.org/t/regenerating-an-rpm-database-from-installed-pa... Can you elaborate on how you would retrieve a backup from /var/adm/backup/rpmdb ? e.g. copy one of the (.gz) over to a then empty (and backup up) /var/lib/rpm and gunzip Packages.db-20240314.gz? :|