The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Server migration problems

Discussion in 'General Discussion' started by Rick C, Aug 21, 2007.

  1. Rick C

    Rick C Member

    Joined:
    Aug 19, 2007
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    1
    Hi there

    I have been having problems using 'Copy multiple accounts/packages from another server'
    it kept saying failed. So i created an account on the new server and set it up as an ftp back up on the old server. All the tar.gz files are on the new server. I used the MV command to move them to the home dir.
    But now when i go to 'Restore a Full Backup/cpmove file' you can only do them 1 at a time and i have 300 accounts. Does anyone know a quicker way of doing this?

    Kind regards,
    Rick
     
  2. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    You could create a shell script that loops through all the .tar.gz archives and runs /scripts/unpkgacct on them.

    For documentation on how to use /scripts/unpkgacct, simply execute /scripts/unpkgacct via SSH as root with no parameters.
     
  3. Rick C

    Rick C Member

    Joined:
    Aug 19, 2007
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    1
    i ran

    cd /home for i in `ls -A *.gz`; do echo "/scripts/restorepkg `echo $i|cut -d . -f 1`";done


    then ran the output

    winner :)
     
Loading...

Share This Page