Reply

Backing up IPAm DHCP configuration data via Perl Script

community Employee
Employee
Posts: 73
2496     0

We are looking for a method to backup the Infoblox Gridmanager Network gridmanager configuration using a perl script. Has anyone developed anything before we go down the route of trying to reinvent the wheel. We would like to have this run on a crontab to backup the configuration and rename it based on date and send it to a file share possibly. Any help appreciated. Thanks

Re: Backing up IPAm DHCP

GHorne Community Manager
Community Manager
Posts: 254
2497     0

a) you can configure the GM to T/FTP or SCP a backup at scheduled times to a remote server.

b) use this script

        #Create a session to the Infoblox appliance        my $session = Infoblox::Session->new(            master   => "192.168.1.2",            username => "admin",            password => "infoblox"        );        #Export backup        $session->export_data(            type   => "backup",            path   => "/tmp/infoblox/database.tar.gz" );

c) you can even script a packup to push to a remote server

 

        #Secured backup        my $result = $session->export_data(            type   => "backup",            backup_type => "SCP",            path   => "/tmp/infoblox/database.tar.gz",            backup_server => "192.168.0.5".            user => "testuser",            password => "test-password",            );      

 

Re: Backing up IPAm DHCP

Expert
Posts: 183
2497     0

I've been looking to do the same however, the push to a remote server doesn't work for me.  The GM in this particular environment is on the other side of a firewall.  I would really like to be able to reach out and pull the database.tar.gz through the firewall from the Linux box that is running the API commands. 

Right now I push the backup from the GM to a Linux server on the same side of the firewall and then have another server come and pull that backup through the firewall.   It works but is an extra step that shouldn’t be needed.

Re: Backing up IPAm DHCP

user42
Techie
Posts: 35
2497     0

Thanks but I think what we are trying to just get like the configuration. Like for instance if we want to restore a scope instead of the entire database. On Windows we got a netsh dump where you could literally just pull out a sectino and use it if needed. Something with the configuration that could be read?

Re: Backing up IPAm DHCP

GHorne Community Manager
Community Manager
Posts: 254
2497     0

if you are running NIOS 6 you can use CSV import and export.

this will let you set up search params (filters) to only get a subent of the data, e.g. 1 or more networks. you can then massage the CSV and push it back.

you can also do this directly with the any of the APIs and the object(s) will contain all the config

the key here is that you have to ask for the specific content

Showing results for 
Search instead for 
Do you mean 

Recommended for You