#1 (permalink)  
Old 06-17-2009, 11:30 AM
Registered User
 
Join Date: Nov 2005
Posts: 16
rajuru is on a distinguished road
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
__________________
[My Blog] :: [Projanmo.com] :: [A/V Search Engine] :: [Flash Gamz]
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 06-17-2009, 12:12 PM
SB-Nick's Avatar
Registered User
 
Join Date: Aug 2008
Posts: 90
SB-Nick is on a distinguished road
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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 06-17-2009, 12:18 PM
Registered User
 
Join Date: Nov 2005
Posts: 16
rajuru is on a distinguished road
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
__________________
[My Blog] :: [Projanmo.com] :: [A/V Search Engine] :: [Flash Gamz]
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 06-17-2009, 12:42 PM
Registered User
 
Join Date: Nov 2005
Posts: 16
rajuru is on a distinguished road
I have found this thread. will it still work?
Transfer account from command line
__________________
[My Blog] :: [Projanmo.com] :: [A/V Search Engine] :: [Flash Gamz]
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 06-17-2009, 12:52 PM
SB-Nick's Avatar
Registered User
 
Join Date: Aug 2008
Posts: 90
SB-Nick is on a distinguished road
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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 06-17-2009, 01:06 PM
SB-Nick's Avatar
Registered User
 
Join Date: Aug 2008
Posts: 90
SB-Nick is on a distinguished road
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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 06-17-2009, 02:05 PM
Registered User
 
Join Date: Nov 2005
Posts: 16
rajuru is on a distinguished road
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.
__________________
[My Blog] :: [Projanmo.com] :: [A/V Search Engine] :: [Flash Gamz]
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old 06-17-2009, 09:02 PM
Senior Member
 
Join Date: Jun 2005
Location: Area 51
Posts: 1,535
Spiral is on a distinguished road
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.
__________________
[b][color="Blue"]Server Support[/color]: [color="Red"]Server consulting, security, and management![/color][/b]
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Command Line? fizz cPanel and WHM Discussions 1 05-19-2006 05:41 AM
exim command line carloseduardoab cPanel and WHM Discussions 2 09-19-2005 11:16 AM
Transfer account from command line akox cPanel and WHM Discussions 2 05-01-2005 01:25 PM
What is the command to restart cpanel via the command line? AbeFroman cPanel and WHM Discussions 2 07-29-2004 04:24 PM
Is there a way to look up how much bandwidth some on has used from the command line? AbeFroman cPanel and WHM Discussions 1 02-18-2004 11:30 PM


All times are GMT -5. The time now is 08:59 AM.


Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
© cPanel Inc