1. Please take a little time for this simple survey! Thank you for participating!
    Dismiss Notice
  2. Dear Pleskians, please read this carefully! New attachments and other rules Thank you!
    Dismiss Notice
  3. Dear Pleskians, I really hope that you will share your opinion in this Special topic for chatter about Plesk in the Clouds. Thank you!
    Dismiss Notice

Move Certificate from domain repository to server repository

Discussion in 'Plesk for Windows - 8.x and Older' started by igoldman, Jan 10, 2008.

  1. igoldman

    igoldman Regular Pleskian

    Sep 14, 2004
    Likes Received:

    I would like to know if there is a command line execution which I can run in order to move a certificate that was install inside domain repository to server repository.

    I would like to do this because if certificate was created under domain repository then there is no way to make it a default certificate. Also there is no way to make it the certificate that Plesk is using.

    This is why I would like to know how to move a certificate from domain repository into server repository.
  2. sergius

    sergius Golden Pleskian

    Nov 6, 2005
    Likes Received:
    Hello Ilan,

    This feature is scheduled for the future versions.

    Now you may try to move it manually.

    1. you should find record in psa.repository which is corresponding to certificate, which should be moved into admin's repository:

    SELECT r.rep_id, r.component_id FROM certificates c, domains d, repository r WHERE r.rep_id = d.cert_rep_id and r.component_id = c.id and d.name = 'domain_name' and c.name = 'cert_name';

    You should take account in this case certificate name should be unique.

    2. Next you should replace rep_id by admin repository id in founded record

    UPDATE repository SET rep_id = <admin_cert_rep_id> WHERE rep_id = <rep_id> and component_id = <component_id>

    3. It is possible to retrieve admin's repository id like

    SELECT val FROM misc WHERE param = 'cert_rep_id';