Sat, 17 Sep 2005
HyperEstraier 0.5.7 was released on September 11th. This includes various changes since last debian packaged version 0.5.4. The soname of libestraier was bumped up from 3 to 5. It changes language bindings to -pure both ruby and java, and adds new language bindings of native version for ruby and java.
Note that this version is incompatible with older version, so that database created by older version can't be handled by this version of command such as estcmd and/or estmaster. hyperestraier_0.5.7-1.deb tries to handle this issues for node database specified by /etc/default/hyperestraier, but be careful. It also keeps older version of estcmd as /var/lib/hyperestriaer/estcmd.$version to access old databases.
I think upstream should provide the command to dump/restore the database (for example, estcmd dump db > tmp, estcmd restore db < tmp, estmaster dump db > tmp, estmaster restore db < tmp). Anyway, there is a way to do this by using existing command sets. To dump database by using estcmd, this is sample code (or used in preinst):
. /etc/default/hyperestraier /etc/init.d/hyperestraier stop || true echo -n "node database dumping..." rm -rf $ROOTDIR.dpkg-tmp mkdir -p $ROOTDIR.dpkg-tmp/_node echo "$2" > $ROOTDIR.dpkg-tmp/_pkg_version for nodedir in $ROOTDIR/_node/* do test -d $nodedir || continue nodename=$(basename $nodedir) echo -n " node/$nodename" nodetmp=$ROOTDIR.dpkg-tmp/_node/$nodename mkdir -p $nodetmp estcmd list $nodedir | while read id uri do estcmd get $nodedir $id > $nodetmp/$id.est done done echo " done."
and to restore this into node database (used in postinst):
. /etc/default/hyperestraier echo -n "node database restoring..." for nodedir in $ROOTDIR/_node/* do test -d $nodedir || continue nodename=$(basename $nodedir) rm -rf $nodedir echo -n " node/$nodename" nodetmp=$ROOTDIR.dpkg-tmp/_node/$nodename for id in $nodetmp/* do test -f $id || continue estcmd put $nodedir $id > /dev/null done done echo " done."
![[ukai]](/images/ukai-hack.png)
