[opensuse] Lost rpm db?
I have a problem.. One of my machines (10.2) lost its installed rpm database.. So, when I do a 'rpm -qa' it shows only 2 packages.. How can I rebuild it accurately? -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
|-----Original Message----- |From: Anders Norrbring [mailto:lists@norrbring.se] |I have a problem.. |One of my machines (10.2) lost its installed rpm database.. |So, when I do a 'rpm -qa' it shows only 2 packages.. | |How can I rebuild it accurately? rpm --rebuilddb See /var/lib/rpm/* for all the stuff -- MortenB -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Morten Bjørnsvik skrev:
|-----Original Message----- |From: Anders Norrbring [mailto:lists@norrbring.se] |I have a problem.. |One of my machines (10.2) lost its installed rpm database.. |So, when I do a 'rpm -qa' it shows only 2 packages.. | |How can I rebuild it accurately? rpm --rebuilddb
See /var/lib/rpm/* for all the stuff
-- MortenB
There's no difference if I run rpm --rebuilddb or even rpm --initdb first. And in /var/lib/rpm/, there's one file 'Packages', and it's only 12288 bytes in size. Something has gone seriously wrong here... Anders. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 The Monday 2008-01-28 at 08:44 +0100, Anders Norrbring wrote:
I have a problem.. One of my machines (10.2) lost its installed rpm database.. So, when I do a 'rpm -qa' it shows only 2 packages..
How can I rebuild it accurately?
You should have backups in "/var/adm/backup/rpmdb", the "Packages" file gzipped by date. But hurry, it is a daily backup holding only a week, so after a week the backup will only have your corrupted copy. - -- Cheers, Carlos E. R. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.4-svn0 (GNU/Linux) iD8DBQFHnbkwtTMYHG2NR9URAhe2AJ9JuRXg+PzuJETf1F9eEPueHiZARQCeLb9L MN8l8NzE5C3cAli7ENzf59Q= =5CnL -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Carlos E. R. skrev:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
The Monday 2008-01-28 at 08:44 +0100, Anders Norrbring wrote:
I have a problem.. One of my machines (10.2) lost its installed rpm database.. So, when I do a 'rpm -qa' it shows only 2 packages..
How can I rebuild it accurately?
You should have backups in "/var/adm/backup/rpmdb", the "Packages" file gzipped by date. But hurry, it is a daily backup holding only a week, so after a week the backup will only have your corrupted copy.
- -- Cheers, Carlos E. R.
*sigh* There are a bunch of gzipped files there, but I guess none of them would be really accurate. Would there be a way to "refresh" a very old copy, like unpack the biggest one and somehow verify it against the actual packages installed? Anders. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 The Monday 2008-01-28 at 12:23 +0100, Anders Norrbring wrote:
You should have backups in "/var/adm/backup/rpmdb", the "Packages" file gzipped by date. But hurry, it is a daily backup holding only a week, so after a week the backup will only have your corrupted copy.
*sigh* There are a bunch of gzipped files there, but I guess none of them would be really accurate. Would there be a way to "refresh" a very old copy, like unpack the biggest one and somehow verify it against the actual packages installed?
The best you can do, as far as I know, is to copy and unzip the latest "correct" version in the backup (probably the biggest), on top of the existing "/var/lib/rpm/Packages" file. Even if it is old, it will be better than having nothing. Then run --rebuild, and later YOU, so that it installs again the updates you are missing in the database list. There is no way I know of to regenerate the database by looking at the installed files all over the distro. I think it should be possible, by comparing files with the list of files in the ARCHIVE list in the dvd, but I do not know if anybody has created such an application. - -- Cheers, Carlos E. R. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.4-svn0 (GNU/Linux) iD8DBQFHncLctTMYHG2NR9URAsMAAJwM2z00XNhb+N1SCFWRZH5VFOloMQCfV/42 e7qVA6Kdp+NbSZjXqUogScg= =IM2V -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Carlos E. R. skrev:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
The Monday 2008-01-28 at 12:23 +0100, Anders Norrbring wrote:
You should have backups in "/var/adm/backup/rpmdb", the "Packages" file gzipped by date. But hurry, it is a daily backup holding only a week, so after a week the backup will only have your corrupted copy.
*sigh* There are a bunch of gzipped files there, but I guess none of them would be really accurate. Would there be a way to "refresh" a very old copy, like unpack the biggest one and somehow verify it against the actual packages installed?
The best you can do, as far as I know, is to copy and unzip the latest "correct" version in the backup (probably the biggest), on top of the existing "/var/lib/rpm/Packages" file. Even if it is old, it will be better than having nothing.
Then run --rebuild, and later YOU, so that it installs again the updates you are missing in the database list.
There is no way I know of to regenerate the database by looking at the installed files all over the distro. I think it should be possible, by comparing files with the list of files in the ARCHIVE list in the dvd, but I do not know if anybody has created such an application.
That means I'm smoked.. Oh well.. I guess I'll find some weird way out eventually.. Hehe Thanks! -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 The Monday 2008-01-28 at 13:15 +0100, Anders Norrbring wrote:
The best you can do, as far as I know, is to copy and unzip the latest "correct" version in the backup (probably the biggest), on top of the existing "/var/lib/rpm/Packages" file. Even if it is old, it will be better than having nothing.
Then run --rebuild, and later YOU, so that it installs again the updates you are missing in the database list.
There is no way I know of to regenerate the database by looking at the installed files all over the distro. I think it should be possible, by comparing files with the list of files in the ARCHIVE list in the dvd, but I do not know if anybody has created such an application.
That means I'm smoked.. Oh well.. I guess I'll find some weird way out eventually.. Hehe
Why? Are all the backups in "/var/adm/backup/rpmdb" bad? Even if they are old, they will be better than what you have. - -- Cheers, Carlos E. R. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.4-svn0 (GNU/Linux) iD8DBQFHnm6ttTMYHG2NR9URAubAAJ4zU/v8zcqXTEi4toXRpcRKfzZyUwCeJsID uJN0XzU9nyUZ87xAqscRvq4= =xjCl -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Carlos E. R. skrev:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
The Monday 2008-01-28 at 13:15 +0100, Anders Norrbring wrote:
The best you can do, as far as I know, is to copy and unzip the latest "correct" version in the backup (probably the biggest), on top of the existing "/var/lib/rpm/Packages" file. Even if it is old, it will be better than having nothing.
Then run --rebuild, and later YOU, so that it installs again the updates you are missing in the database list.
There is no way I know of to regenerate the database by looking at the installed files all over the distro. I think it should be possible, by comparing files with the list of files in the ARCHIVE list in the dvd, but I do not know if anybody has created such an application.
That means I'm smoked.. Oh well.. I guess I'll find some weird way out eventually.. Hehe
Why? Are all the backups in "/var/adm/backup/rpmdb" bad? Even if they are old, they will be better than what you have.
The best they could do was some 10-12 packages.. And that won't so much good. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Tuesday 29 January 2008 12:10:18 am Anders Norrbring wrote:
Carlos E. R. skrev:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
The Monday 2008-01-28 at 13:15 +0100, Anders Norrbring wrote:
The best you can do, as far as I know, is to copy and unzip the latest "correct" version in the backup (probably the biggest), on top of the existing "/var/lib/rpm/Packages" file. Even if it is old, it will be better than having nothing.
Then run --rebuild, and later YOU, so that it installs again the updates you are missing in the database list.
There is no way I know of to regenerate the database by looking at the installed files all over the distro. I think it should be possible, by comparing files with the list of files in the ARCHIVE list in the dvd, but I do not know if anybody has created such an application.
That means I'm smoked.. Oh well.. I guess I'll find some weird way out eventually.. Hehe
Why? Are all the backups in "/var/adm/backup/rpmdb" bad? Even if they are old, they will be better than what you have.
The best they could do was some 10-12 packages.. And that won't so much good.
Have tired to access /var/cache/zypp/zypp.db . Make a copy in your home directory and look in. It is SQLite database. -- Regards, Rajko -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
participants (4)
-
Anders Norrbring
-
Carlos E. R.
-
Morten Bjørnsvik
-
Rajko M.