Current time: 11-30-2024, 01:13 PM Hello There, Guest! (LoginRegister)


Post Reply 
Moving user accounts between servers
Author Message
rsmithgs Offline
Junior Member
*

Posts: 176
Joined: Apr 2007
Reputation: 1
Post: #1
Moving user accounts between servers
Hi Guys,

I was wondering if anyone had a script/tool/howto for moving user accounts between servers? Like an export/import thing?

Many Thanks Smile
08-16-2007 07:26 PM
Find all posts by this user Quote this message in a reply
BeNe Offline
Moderator
*****
Moderators

Posts: 5,899
Joined: Jan 2007
Reputation: 68
Post: #2
RE: Moving user accounts between servers
No, there is non script yet!
But maybe you can use rsync or a tar.gz. But don´t forget the DB.

Greez BeNe
08-17-2007 12:10 AM
Visit this user's website Find all posts by this user Quote this message in a reply
rsmithgs Offline
Junior Member
*

Posts: 176
Joined: Apr 2007
Reputation: 1
Post: #3
RE: Moving user accounts between servers
BeNe Wrote:No, there is non script yet!
But maybe you can use rsync or a tar.gz. But don´t forget the DB.

Greez BeNe
Hi Bene, thanks for the input Smile

What about the separation of the users email accounts?

Many Thanks
08-17-2007 12:26 AM
Find all posts by this user Quote this message in a reply
BeNe Offline
Moderator
*****
Moderators

Posts: 5,899
Joined: Jan 2007
Reputation: 68
Post: #4
RE: Moving user accounts between servers
You find the virtual e-Mail folders under /var/mail/virtual per Domain.
So you can also use here rsync or something.

Greez BeNe
08-17-2007 12:42 AM
Visit this user's website Find all posts by this user Quote this message in a reply
rsmithgs Offline
Junior Member
*

Posts: 176
Joined: Apr 2007
Reputation: 1
Post: #5
RE: Moving user accounts between servers
Hi Bene,

Would this keep the email username and password details?

Many Thanks Smile
08-17-2007 12:49 AM
Find all posts by this user Quote this message in a reply
BeNe Offline
Moderator
*****
Moderators

Posts: 5,899
Joined: Jan 2007
Reputation: 68
Post: #6
RE: Moving user accounts between servers
The Password itself is in the DB, but maybe Postfix will missing some own .db files. Never tested before - was just a brainstorming. Smile

Or we need someone to test it...

Greez BeNe
08-17-2007 12:51 AM
Visit this user's website Find all posts by this user Quote this message in a reply
rsmithgs Offline
Junior Member
*

Posts: 176
Joined: Apr 2007
Reputation: 1
Post: #7
RE: Moving user accounts between servers
BeNe Wrote:The Password itself is in the DB, but maybe Postfix will missing some own .db files. Never tested before - was just a brainstorming. Smile

Or we need someone to test it...

Greez BeNe

Adding to the brain storm, aren't the details for the mail boxes kept by courier?

It does need testing Smile though I've out of servers at the moment lol.
08-17-2007 12:53 AM
Find all posts by this user Quote this message in a reply
hjansen Offline


Posts: 3
Joined: May 2007
Reputation: 0
Post: #8
RE: Moving user accounts between servers
Here are just my 2 cents because im moving a lot of user accounts from confixx to vhcs which should be still very similar ...

- Create the user account on the new server ...
- ssh login at the old server
- copy the users htdocs folder via scp to the new server
( scp -r * username@hostname:/var/www/virtual/domainname/htdocs/ )

- create the e-mail accounts at the new server like they are at the old server
- for the usersnames and passwords u can just look inside the database of the old server they are all inside here.
- ssh login old server
- copy the maildir from the old to the new server via scp
( /var/mail/virtual/domainname/mailboxname/[cur|new|tmp] )
sometimes there are some wired named files that scp is not cabable to copy directly. just tar the hole stuff then and copy the tar file to the new server

- after that you have to copy the database of the user. i prefer doing that with phpMyAdmin but u could also use the mysql command line tool via saving an extract of the databases copy them via scp to the new server and importing them there ( dont forget to create the database at the new server )


while thinking about it, it should be not a big deal to write a small perl script that is doing that by itself. i will think about it when there is a stable ispCP that i can play arround with ...
(This post was last modified: 09-02-2007 06:21 PM by hjansen.)
09-02-2007 06:20 PM
Find all posts by this user Quote this message in a reply
rsmithgs Offline
Junior Member
*

Posts: 176
Joined: Apr 2007
Reputation: 1
Post: #9
RE: Moving user accounts between servers
Cool, might give that a test run over the next few days. Cheers Smile
09-02-2007 06:33 PM
Find all posts by this user Quote this message in a reply
GaRCieLD Offline
Junior Member
*

Posts: 15
Joined: Jun 2007
Reputation: 0
Post: #10
RE: Moving user accounts between servers
I use this method to move users from one server to other...

a) Insert the new domains & mail users & ftp users & db in the new ispcp server (yes...no migration script yet... Sad so make it hand-made...or try to make the script...maybe the vhcs2ispcp with some modifications...)

b) copy the htdocs with rsync from the new server (apt-get install rsync if not found)

Code:
rsync -raz IP_ORIGINAL_SRV:/var/www/virtual/DOMAIN_NAME/htdocs/ /var/www/virtual/DOMAIN_NAME/htdocs/

c) copy the mails with imapsync (apt-get install imapsync if not found)

Code:
imapsync --host1 IP_ORIGINAL_SRV --user1 NAME@DOMAIN_NAME --password1 FROM_DB --host2 IP_NEW_SRV --user2 NAME@DOMAIN_NAME --password2 FROM_DB --subscribed --subscribe

d) test the system, and change the dns for one or two domains to test the server, and if all was correct, move the rest. You can update the htdocs & mails running the same scripts, because they will update the files & the mails automaticaly.

Feel free to update this info... and maybe we can make a wiki with all the info...
09-03-2007 07:14 PM
Find all posts by this user Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)