This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Massive modification of hosts

We're about to redefine completely our IPs on our computers, but modifying hosts IPs in astaro one by one can be a bummer.

Is there a better way to do this ? is it possible to change a flat file using sed, or awk to achieve the best result with the less effort ? 

is it possible to expand an .abf backup, then patch the definitions, and repack it for upload ? 

Thanks for your help.


This thread was automatically locked due to age.
  • Unfortunately there's no way to modify them en masse; there is no flat file that stores the settings, it's all stored in the on-board Postgres DB.
  • ok. thanks for the anwser.

    the next logical question is : 

    is the database synchronised with effectives rules (somehow) at powerdown ? 

    and if not, can i modify the database with sql request easily, and then applying the changes somehow ? 

    and then, if i can, how do i know the database password ? and can someone tell me table and fields used for hosts definition, or should i shovel my path through ?
  • I think the fastest method possible at present is to modify each definition by pasting the new IP from a prepared list.

    Cheers - Bob
  • with up to 50 hosts, why not. but in my case, it's more than 300 hosts known, and then, i'm not fond of cut and paste solution.
    being able to generate sql request automatically from a flat file and then running them at once would be a lot faster.
  • It's been a few years since I did SQL programming, and it wasn't PostgreSQL, so all I see there is the potential for doing something that voids the Astaro warranty and support agreement.  It's hard to imagine that it would be faster to tripatouiller in the database than to just make the changes manually in under two hours.

    I did a similar thing with a client who had bout 50 hosts.  When I was done, I ran back through the definitions, copied the IPs into a new column on my spreadsheet and compared to be sure that I had copied everything correctly.  It took me about 30 minutes.

    Having said that, if you decide to try it and you find some nifty tricks, please share with the rest of us!

    Cheers - Bob
  • Have you started a case with Astaro Support?  They may be able to help you, since you have 300 hosts to deal with.
  • It's been a few years since I did SQL programming, and it wasn't PostgreSQL, so all I see there is the potential for doing something that voids the Astaro warranty and support agreement.  It's hard to imagine that it would be faster to tripatouiller in the database than to just make the changes manually in under two hours.


    I haven't done this with Astaro's DB, but FYI it's easy to take a list of IPs, put them in a spreadsheet, write an SQL insert statement, and then duplicate it for each IP, and then paste it into a database client. That would be much faster than entering definitions by hand.

    Barry
  • Perhaps, you can modify and add objects with the confd command-line client. Better than modifiying the database direct.

    fw:/root # cc
    Confd command-line client.  Maintainer: 
    $Id: confd-client.pl,v 1.107.2.8.2.8 2009/05/08 09:55:03 ischwarze Exp $

    Connected to 127.0.0.1:4472, SID = IEAQlemMSzFQDLRmPBrZ.
    Available modes: MAIN OBJS RAW WIZARD.
    Type mode name to switch mode.
    Typing 'help' will always give some help.