Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 8 of 8
  1. #1
    Member
    Join Date
    Nov 2005
    Posts
    23

    Default Transfer sites from command line

    hello,
    i need help in transferring a lots of sites. i need to transfer (suppose) 500 sites out of total 1000 accounts in a server. it is not possible to find & check 500 sites and check the express transfer box. its so bad that there is not option to check all for express mode option.

    thats why i am planning to write a script. i can handle the script part. but i need to know how to transfer the site in command line.

    i have a list of domains/username in a text file. using the script i will transfer each site.
    how can I do it?


    anything to do it like:
    restorepkg root@OLD_SERVER_IP username --express


    thanks

  2. #2
    Member SB-Nick's Avatar
    Join Date
    Aug 2008
    Posts
    110

    Default

    Hey,

    You can use rsync to transfer all the cpanel backups from one server to the other, you have to pack each account using "/scripts/pkgacct" from command line and then restore each account using "/scripts/restorepkg"

    This is a extremely easy thing to automatize with a small shell script and rsync with SSH public/private keys.
    :: Server Buddies ::

    Server Management & Monitoring

    .Dedicated Server Solutions At Affordable Rates.

  3. #3
    Member
    Join Date
    Nov 2005
    Posts
    23

    Default

    Quote Originally Posted by SB-Nick View Post
    Hey,

    You can use rsync to transfer all the cpanel backups from one server to the other, you have to pack each account using "/scripts/pkgacct" from command line and then restore each account using "/scripts/restorepkg"

    This is a extremely easy thing to automatize with a small shell script and rsync with SSH public/private keys.
    thanks first for ur kind reply.

    problem of rsync is the express transfer. cpanel's express transfer nicely suspends the site in the remote server, point all A records to new server etc. how can I do that using rsync?

    thanks

  4. #4
    Member
    Join Date
    Nov 2005
    Posts
    23

    Default

    I have found this thread. will it still work?
    Transfer account from command line

  5. #5
    Member SB-Nick's Avatar
    Join Date
    Aug 2008
    Posts
    110

    Default

    A quick solution would be to use '/scripts/suspendacct' script after each successfully account restore on the new server and to update the A record for the zone located in /var/named/ for the given domain using a stream editor (ie: sed).
    :: Server Buddies ::

    Server Management & Monitoring

    .Dedicated Server Solutions At Affordable Rates.

  6. #6
    Member SB-Nick's Avatar
    Join Date
    Aug 2008
    Posts
    110

    Default

    Sorry, I did not note your last reply.

    I believe /scripts/getremotecpmove prompts for the account password every time you run it so I doubt you can automatize the migration process with it.
    :: Server Buddies ::

    Server Management & Monitoring

    .Dedicated Server Solutions At Affordable Rates.

  7. #7
    Member
    Join Date
    Nov 2005
    Posts
    23

    Default

    thanks for your efforts.

    i find it easier to check the accounts. but i will appreciate if cpanel makes it easier to select 'express transfer' option for many domains.

  8. #8
    BANNED
    Join Date
    Jun 2005
    Location
    Wild Wild West
    Posts
    2,025

    Default

    The IP should be reassigned automatically when you restore the cpmove
    file on the new server (usually to the shared default IP for that server)
    but you can also individually and mass change IPs easy enough.

    The only thing I recommend is that before transferring, you duplicate
    the settings, features, and package plans on the new server to be
    the same as the old server before transferring accounts and it will
    make your life much easier and things should sync up nicely.

Similar Threads & Tags
Similar threads

  1. Command line
    By -X-Pain in forum cPGS Discussions
    Replies: 2
    Last Post: 09-13-2009, 11:34 AM
  2. Bandwidth from the Command Line
    By 878shelby in forum cPanel and WHM Discussions
    Replies: 8
    Last Post: 03-29-2007, 01:14 PM
  3. Command Line?
    By fizz in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 05-19-2006, 04:41 AM
  4. Transfer account from command line
    By akox in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 05-01-2005, 12:25 PM
  5. What is the command to restart cpanel via the command line?
    By AbeFroman in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 07-29-2004, 03:24 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube