how to create 10000 accounts simultaneously and tranfer them to another server

mojamoi

Well-Known Member
Jul 23, 2007
195
0
66
how to create 10000 accounts simultaneously and tranfer them to another server using shell command
 

cPanelKenneth

cPanel Development
Staff member
Apr 7, 2006
4,607
80
458
cPanel Access Level
Root Administrator
Code:
#!/bin/bash
for a in `seq 1 10000`; do
    /scripts/wwwacct domain$a.com user$a password
    /scripts/pkgacct user$a
    scp /home/cpmove-user$a.tar.gz [email protected]:~
; done
Not guaranteed to work.
 

mojamoi

Well-Known Member
Jul 23, 2007
195
0
66
thanks alot guys....:)


it does work using a for loop....


is there any alternate way via shell script?
 

mojamoi

Well-Known Member
Jul 23, 2007
195
0
66
let me know how to make package of 1000 accounts at one server and how to restore at

let me know how to make package of 1000 accounts at one server and how to restore at another server
 

mojamoi

Well-Known Member
Jul 23, 2007
195
0
66
yes got some good replies via another thread....

but can u help me with the script used in WHM for doing bulk account transfer?:confused:
 

mojamoi

Well-Known Member
Jul 23, 2007
195
0
66
for better performance!!!

my superior requires me use better method?

do u have the WHM script for bulk account transfer?
 

mojamoi

Well-Known Member
Jul 23, 2007
195
0
66
for better performance!!!



do u have the WHM script for bulk account transfer?
 

-jdk-

Well-Known Member
Aug 28, 2005
63
0
156
Just put the information in a shell script and then call the script :)
 

mojamoi

Well-Known Member
Jul 23, 2007
195
0
66
help more

1. Craft a perl script using WWW::Mechanize to interact with the Create Account form in WHM


pls help me ..can u craft the script and give me?
 

brianoz

Well-Known Member
Mar 13, 2004
1,146
7
168
Melbourne, Australia
cPanel Access Level
Root Administrator
If you copy the for loop given above into a file, you can run it as a shell script. A shell script, at it's simplest, is just a sequence of commands you'd type to a root prompt put in a file.

You're going to need to do some reading here, this isn't a forum for teaching you the basics if you're unwilling to do that. Do some googling for unix primers or unix tutorials and spend some time studying them.

Also, your original request really doesn't make sense. It's ridiculous to make 10000 accounts on a server, then transfer them; it would make much more sense to create them on the new server. If we had some idea what you're actually trying to do we could probably give you better advice, but at the moment what you're asking for help with is going to cause you pain down the track, it's just not the right way to do it.

Also, if you're making 10000 accounts you normally need to know the domain name for the accounts, unless you want it to be a dummy domain name.

Sounds like you should get a book on WHM like the Packt book, available on Amazon.
 

brianoz

Well-Known Member
Mar 13, 2004
1,146
7
168
Melbourne, Australia
cPanel Access Level
Root Administrator
Bulk transfer? Have you looked at WHM, as it does provide that functionality if you have root access. If you don't have root access, your server administrator may be willing to do the copies for you. If you were to search these forums you will find lots of information on how to do bulk transfers.

My comments in the other thread about putting in some effort to understand the answers you are given apply here too!
 

cPanelKenneth

cPanel Development
Staff member
Apr 7, 2006
4,607
80
458
cPanel Access Level
Root Administrator
1. Craft a perl script using WWW::Mechanize to interact with the Create Account form in WHM


pls help me ..can u craft the script and give me?
What is the problem you are attempting to solve?

Why must you create 10,000 accounts on one server, then transfer them to another server?
 

BianchiDude

Well-Known Member
PartnerNOC
Jul 2, 2005
617
0
166
What is the problem you are attempting to solve?

Why must you create 10,000 accounts on one server, then transfer them to another server?
You seriously put 10,000 accounts on a server? No wonder you need to move them to a faster server.

A better idea would be to put them on 2 or more servers.
 

mojamoi

Well-Known Member
Jul 23, 2007
195
0
66
pls craft this script to add and restore 1000 accounts on cpanel serevrs

#!/usr/bin/perl -w

use strict;
use WWW::Mechanize;
use MIME:ase64;

my $mech = WWW::Mechanize->new( autocheck => 1 );
my @args = (
Authorization => "Basic " .
MIME:ase64::encode( 'user' . ':' . 'pass' )
);

$mech->credentials( 'http://hosting.com:5555', 'cPanel', 'user', 'pass' );
$mech->get( 'http://hosting.com:5555', @args );
$mech->follow_link( text => 'Addon Domains', n=> 1 );