1. Please take a little time for this simple survey! Thank you for participating!
    Dismiss Notice

how do i move a domain from one client to another.

Discussion in 'Plesk for Linux - 8.x and Older' started by littlefrog, Jan 4, 2005.

  1. littlefrog

    littlefrog Regular Pleskian

    25
     
    Joined:
    Jul 30, 2008
    Messages:
    176
    Likes Received:
    0
    how do i move a domain from one client to another. This is something I do a lot and hate having to do manually in the database. Is there no tools in plesk to do this?
     
  2. tpujals

    tpujals Guest

    0
     
    Yep this is a feature I could use right now. Technically you could do it with migration manager, but if the current client exists on the destination server then it won't work.

    I guess it's more for security that you can't switch domain owners around.
     
  3. Cranky

    Cranky Guest

    0
     
    It would be a useful feature but it's not possible in plesk 7.5.x - it is possible in 4PSA Notifications if you're despeate for it, otherwise you'll need to either write a custom script to do the DB updates, or wait until Plesk 8.x or beyond.
     
  4. littlefrog

    littlefrog Regular Pleskian

    25
     
    Joined:
    Jul 30, 2008
    Messages:
    176
    Likes Received:
    0
    Here is what my simple fix was

    Requires PHPMyAdmin or whatever they call it now the MYSQL Admin Tools.

    View the database PSA

    Browse the table called 'clients'

    Write down the ID of the client you want to move the domain to

    Browse the table called 'domains'

    Edit the domains you want to move and change the cl_id (Client ID) to the ID you wrote down.

    Now I have been doing this for so long.. Plesk V1.3 and it sucks.
    I wish that there was a way for an admin to click on preferences of a domain and see a drop down of the clients or something along those lines.

    Need to add this to the wish list.
     
  5. Cranky

    Cranky Guest

    0
     
    Yeah phpmyadmin is the simplest way ... however, if you think about it you're just manully running SQL queries (finding client id's then updating it) ... if someone puts that into a PHP script updates will be simple - so simple I'm surprised Plesk doesn't offer the ability yet, but easy enough for someone to write a script to do it.
     
  6. vipa5000

    vipa5000 Guest

    0
     
    /usr/local/psa/bin/domain.sh i belive is a way to change the owner i know i did it from term like that but i forgot exactly which file i used i belive it was domain.sh
     
  7. md3vxx

    md3vxx Guest

    0
     
    Script

    I wrote a simple script to do this called: clientmove

    ==

    #!/bin/sh
    echo
    echo *CLIENTMOVE - PLESK CLIENT MOVE*
    echo v.1.0.1 [m]
    echo
    echo Syntax is: ./clientmove {id to move to} {domain name to move}
    echo
    /usr/bin/mysql -u admin -p`cat /etc/psa/.psa.shadow` -e "UPDATE domains SET cl_id = '$1' WHERE name = '$2';" psa
    echo

    ==

    m
     
  8. bartje3

    bartje3 Guest

    0
     
    Simple way

    Hi,

    You can move domains between clients by (mis)using Migration tool. (but you'll need at least 2 servers)
    Migrate the single domain to the other machine, and after that migrate it back to the first server on another client account.

    I'll hope that SWSoft will create a function which will migrate domains to clients on the same server, shouldn't be a big difference. I have found a "leak" in this Migration tool, when you input a second IP (not the main IP) from your server, you are able to migrate to "yourself". Unfortunely Plesk disables all domains which are already on the server, a little tweak in the psa db could be a solution who knows ? Also when the domain is disabled, Plesk knows that it is already on the server. (Sh*t)

    So try the first solution, while SWSoft (or someone) finds a way to do this by migration manager...

    Regards,
    Bart
     
  9. insel

    insel Guest

    0
     
    I just tested a

    /usr/local/psa/bin/domain.sh --update $DOMAIN -clogin $CLIENT

    and it moved the domain $DOMAIN from it's former client to the client $CLIENT.

    insel.

    P.S.: See http://forum.plesk.com/showthread.php?s=&threadid=16374 also
     
  10. squalo

    squalo New Pleskian

    22
    73%
    Joined:
    Oct 7, 2004
    Messages:
    17
    Likes Received:
    0
    tried in this way:
    digit: /usr/local/psa/mysql/bin/mysql -uadmin -p
    digit root pws
    digit: use psa;
    digit: SELECT cname, pname, login, id from clients;
    remember id of the client
    digit: UPDATE domains SET CL_id = (client-id) WHERE name = 'mydomain.com';

    if the server answers 0 = to correct the error
    if the server answers 1 = all ok!


    excused my English :)
     
  11. ad7742

    ad7742 Guest

    0
     
    It would be great if people read the manuals. :)

    As insel said, just use domain.sh

    /usr/local/psa/bin/domain.sh --update $DOMAIN -clogin $CLIENT

    This tool has been available since Plesk 6. I would strongly suggest that everyone checks out the commands in the folders:

    /usr/local/psa/bin
    and
    /usr/local/psa/admin/bin

    Most of them you can execute with the --help suffix, which shows you how powerful they are. They _really_ open up what can be done with Plesk in terms of automation. They also ensure that every single reference to the domain is updated correctly in the database and in all other config files.

    For example, in this case (just moving a domain to a different client) editing the DB is not _too_ risky, but none of the posts above mention the fact that you need to ensure that IP address of the domain is added to the client's IP pool...

    I'd strongly advise leaving the database alone and checking out those scripts!
     
  12. CJ_UK

    CJ_UK Guest

    0
     
    Yep, using the psa script listed above certainly worked for me.
    Very, very easy. :)

    ./domain.sh --update domain.com -clogin cplogin

    I still cant find the mentioned ~move domain button ~ in the control panel as listed in the 7.5 *nix reloaded manual! :confused:
     
  13. justyxxxx

    justyxxxx Guest

    0
     
    The "move a domain from one client to another client" feature is now in the Control Panel of 7.5.3
     
  14. lvalics

    lvalics Silver Pleskian Plesk Guru

    36
    43%
    Joined:
    Jun 20, 2003
    Messages:
    960
    Likes Received:
    28
    Location:
    Romania
    Anyone found where is in Plesk 7.5.3?
     
  15. justyxxxx

    justyxxxx Guest

    0
     
    Show a list of the domains and it's directly above the list of domains - you can check off the domain you want to move.
     
Loading...