convert database from 0.4.x to 0.6.x

Help
Frankie
2007-06-19
2013-03-09
  • Frankie
    Frankie
    2007-06-19

    Hi,
    many years I used xca 0.4.x. Now I plan use the new version of xca - 0.6.3. Is there some way to convert the data from xca 0.4.x to the new one (.db to .xdb)? I know, one way is export all certs from old, and import these certs into new - but not for me - I have too many certificates stored here.

    Thanks all for help,
    sincerely, Frankie

     
    • http://xca.sourceforge.net/xca-2.html

      This operation won't change your original file *.db
      On windows the installer will dump the default database automatically,
      you just need to import the db_dump into your new xdb

       
    • Frankie
      Frankie
      2007-06-20

      Hi Christian,
      I found db_dump.cpp in folder lib of distro xca 0.6.3, I compiled them, but I think, that here is something wrong. On <http://xca.sourceforge.net/xca-2.html> I found solution: "The command is: db_dump -f xca.db.dump xca.db". But when I look into source of db_dump.cpp, the syntax is not correct:

      Source code of db_dump.cpp:
      ---------------------------
      /* vi: set sw=4 ts=4:
      *
      * Copyright (C) 2001 - 2007 Christian Hohnstaedt.
      *
      * All rights reserved.
      */

      #include "db.h"

      int main(int argc, char *argv[])
      {
              if (argc<2)
                      return 1;

              QString database = argv[1];

              db mydb(database);
              unsigned char *p;
              db_header_t h;
              int i=0;
              char type[] = "NKRCLTSXX";

              mydb.first(0);
              while (!mydb.eof()) {
                      p = mydb.load(&h);
                      free(p);
                      printf("%3d: %c V%d O:%6d, F:%x L:%5d %s\n",
                              i++, type[h.type], h.version, mydb.head_offset,
                              h.flags, h.len, h.name);
                      mydb.next(0);
              }
      }
      ----------------------------------------
      Here is the first argument a name of database, but in "<http://xca.sourceforge.net/xca-2.html>" the first argument is "-f". I'm not C++ programmer :), so pls be patient with me. I tryed command "db_dump xca.db.ascii xca.db", but only empty file xca.db.ascii was created. Can you help me pls ? Maybe I make something wrong.

      Sincerely, Frankie

       
    • Yeah, you got that terribly wrong:-)
      The db_dump.cpp in lib is a debug-app for my new database-format.

      The db_dump I'm talking about is part of the Berkeley db package. (libdb...)
      On debian, the Berkeley db_dump applications are named "db4.2_dump" for version 4.2
      of the berkeley-DB.

      Use the package manager of your linux-distribution to find the libdb... package

       
    • Frankie
      Frankie
      2007-06-21

      Thank you for help, now is all OK.
      Have a nice day, Frankie