[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [cobalt-users] RAQ550 DNS records file



> There is no 'records' file on the 550
> I guess it's in the database.
> Anyone know how to dump the postgres database?

It is stored in CCE, not postgres.  I have added a script that I use to dump
CCE when I do development, milage may vary.  Uncomment the next if line to get
just the dns records. 

>  Thanks for that, I was almost pulling my hair out...
> Now I assume there is no way we can copy  Full DNS "records" or whatever it is,
> Could be re-migrated to another RAQ550 directly ...
> Next Q. would be is there different way to migrate 550 DNS records to 550
> without losing info?
>  
> Tunc

I am working on getting this added to the next version of CMU.  Right now I can
see no easy way of doing this, except by direct copying of the files, which
mean you cannot use the UI on the destination RaQ for DNS.

Jeff-

#!/usr/bin/perl
# $Id: cceBarf.pl,v 1.4 2001/05/29 20:02:51 jeffb Exp $
# Jeff's script for dumping cce

use strict;

use lib "/usr/sausalito/perl";
use CCE;
use Data::Dumper;

my $cce = new CCE;
$cce->connectuds();

my ($ok, $cceObj, @oids, @namespace, $nsObj, @oids);
my @classes = $cce->classes();
foreach my $class (@classes) {
    #next if($class !~ /dns/i);
    print "--------\nCLASS: $class\n--------\n";
    @oids = $cce->find($class);
    foreach my $oid (@oids) {
        print "--------\n BASE\n--------\n";
        ($ok, $cceObj) = $cce->get($oid);
        print Dumper($cceObj);
        print "--------\n END BASE\n--------\n";
        ($ok, @namespace) = $cce->names($oid);
        foreach my $name (@namespace) {
            print "--------\n NAMESPACE: $name\n--------\n";
            ($ok, $nsObj) = $cce->get($oid, $name);
            print Dumper($nsObj);
            print "--------\n END NAMESPACE: $name\n--------\n";
        }
    }
    print "--------\n END CLASS: $class\n--------\n";
}
$cce->bye("bye");
exit 0;