Results 1 to 5 of 5
  1. #1

    Urgent Cpanel Help Needed

    sorry if this is in wrong forum - admins/mods move if you wish

    hi,
    i have messed up cpanel on my servers slightly - let me explain
    i did a 'copy multiple accounts from another server' in whm on my new cpanel server, (which im using as a backup server) but i forgot to disable the dns clustering first so all the dns ips on my main server have changed to the ip of my second server - as have the nameserver info for each domain, whis is not what i want, so im wondering if their is a command i can run as root on my main server that can search for a string in multiple files and change it to something else - otherwise i am going to have to go through about 80 dns records by hand and change settings - which will take forever

    thanks

  2. #2
    Join Date
    Aug 2003
    Posts
    643
    You could use sed

    Write a php script or the like to loop files and use sed to find/replace lines maybe? Just an idea.

    Best of luck!

  3. #3
    Join Date
    Aug 2004
    Posts
    136
    well DJ_Steve you can do the following

    login to the server as root

    then type :

    cd /var/named

    then

    perl -pi.bak -e "s/[oldip]/[newip]/g" *.db

    this will change all the ips and also will create a backup copy
    in case you want it back to the old ip

  4. #4
    thanks Nazmy - ill give that a go

  5. #5
    that worked great - thanks alot for the help

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •