Subject: Re: [vserver] copied vservers to a new host, and now can't use vyum
From: "Roderick A. Anderson" <raanders@cyber-office.net>
Date: Mon, 23 Feb 2009 11:53:09 -0800

Eric Jorgensen wrote:
> Hello,
> 
> Thanks for the suggestion - unfortunately I'm still getting the same 
> error.  Any idea on how to upgrade an rpmdb by  hand?

Sorry to take so long to get back to you.  I changed/upgrade my mail 
server and the account lists were going to and forgot to tell 
Thunderbird to check for messages in the Vserver folder.  :-(

Here is what my searches indicate.

On the old system install the db3-utils package and export the databases 
in /vservers/$GUEST/var/lib/rpm.

Copy/move them over to the new system (some place private) and use the 
db4-utils to import.

I got this from:

http://lists.andrew.cmu.edu/pipermail/info-cyrus/2007-July/026507.html

Which is talking about cyrus but the process should be the same ... 
hopefully.


Good luck,
Rod
-- 
> Eric
> 
> 
> ------------------------------------------------------------------------
> *From:* Roderick A. Anderson <raanders@cyber-office.net>
> *To:* vserver@list.linux-vserver.org
> *Sent:* Wednesday, February 18, 2009 9:35:33 AM
> *Subject:* Re: [vserver] copied vservers to a new host, and now can't 
> use vyum
> 
> Eric Jorgensen wrote:
>  > Hello,
>  >
>  > I moved from a centos4 to centos5 based system.  The new system is a 
> DHozak kernel:  2.6.22.19-vs2.3.0.34.1 and I'm running is 
> util-vserver-0.30.216-1.pre2793.
>  > I copied over /etc/vservers and /vservers to the new host using tar 
> since there are symbolic links.  However, now that I'm on the new host, 
> I am unable to run vyum on any of my guests.  They are a combination of 
> centos 4 and 5.  I was running an older version of util-vserver on the 
> previous host; I do not know the exact version now.
>  >
>  > This is the error I get:
>  >
>  > [root@servernew ~]# vyum j_hia -- check-update
>  > rpmdb: Program version 4.3 doesn't match environment version
>  > error: db4 error(-30974) from dbenv->open: DB_VERSION_MISMATCH: 
> Database environment version mismatch
>  > error: cannot open Packages index using db3 -  (-30974)
>  > error: cannot open Packages database in /vservers/j_hia/.rpmdb
>  > Traceback (most recent call last):
>  >  File "/usr/bin/yum", line 29, in ?
>  >    yummain.main(sys.argv[1:])
>  >  File "/usr/share/yum-cli/yummain.py", line 85, in main
>  >    base.getOptionsConfig(args)
>  >  File "/usr/share/yum-cli/cli.py", line 163, in getOptionsConfig
>  >    disabled_plugins=self.optparser._splitArg(opts.disableplugins))
>  >  File "/usr/lib/python2.4/site-packages/yum/__init__.py", line 164, 
> in _getConfig
>  >    self._conf = config.readMainConfig(startupconf)
>  >  File "/usr/lib/python2.4/site-packages/yum/config.py", line 706, in 
> readMainConfig
>  >    yumvars['releasever'] = _getsysver(startupconf.installroot, 
> startupconf.distroverpkg)
>  >  File "/usr/lib/python2.4/site-packages/yum/config.py", line 776, in 
> _getsysver
>  >    idx = ts.dbMatch('provides', distroverpkg)
>  > TypeError: rpmdb open failed
>  >
>  >
>  > Any  help would be appreciated in being able to use vyum again.
> 
> Somewhere along the way dbm was move from version three to four.  They 
> don't play well together.
> 
> Totally a from-the-hip shot and untested; you might try vrpm $GUEST -- 
> --rebuilddb
> 
> 
> Rod
> -- 
>  >
>  > Thanks!
>  >
>  > Eric
>  >