theAcolyte has asked for the wisdom of the Perl Monks concerning the following question:

Hi! I have some DBM files from a solaris system I am trying to access, but I'm not entirely sure what type they are. They are saved as filename.dir and filename.pag.

I'm no longer on the Solaris system -- now on linux -- and have been able to bring up the keys with SDBM_File but not the values. NDBM doesn't seem to be available on linux ... and I'm not sure what to do next.

Ideally, I just want to recover the data, and then put it into a more linux friendly format. Any advice (other then "get from the original server" - which I can't do) would be very helpful.

Thanks,
Erik

Replies are listed 'Best First'.
Re: NDBM access w/o solaris
by matija (Priest) on Apr 03, 2004 at 16:21 UTC
    NDBM doesn't seem to be available on linux
    That's strange - I have it on my Debian sarge system, and I don't remember it's ever not being there. Have you tried
    use NDBM_File;
    It works for me, and if it works for you, your problem is solved. If that fails, and you don't have too many files (and they don't contain too sensitive data), I can transfer them for you for free. (I have access to both Linux and Solaris machines). MSG me and we can arrange details.

    If you do have too many files, I'll be quite happy to charge you a fair price ;-)

Re: NDBM access w/o solaris
by jZed (Prior) on Apr 03, 2004 at 16:23 UTC
    ODBM also uses .dir and .pag extensions, so maybe that's what created the files. Also, if you can't bring up the keys, maybe they were serialized with MLDBM so try using that. If you're a database guy/gal, check out my as yet un-announced DBD::DBM, a DBI driver for all types of DBM and MLDBM files - it comes bundled in the latest DBI 1.42 distribution.

    updateOoops, just noticed the solaris/linux thing - the data files are platform specific, so you'll almost certainly need to dump them on solaris and re-import them on linux.

      actually ... already had found your module on CPAN and while it didn't solve the problem I'm leaving it installed as its a pretty nice tool to have laying around for simple database needs. good stuff!