How to synchronize subscriptions with service plans?

Created:

2016-11-16 13:09:14 UTC

Modified:

2017-08-16 16:38:51 UTC

1

Was this article helpful?


Have more questions?

Submit a request

How to synchronize subscriptions with service plans?

Applicable to:

  • Plesk for Windows
  • Plesk for Linux

Question

How to synchronize subscriptions with service plans?

Answer

One subscription can be synchronized in the following way:

  1. Go to Home > Subscriptions > example.com

  2. Click Unlock & Sync button.

All the subscriptions can be synchronized with command line utility:

  • For Linux-based servers
    1. Login to the server via SSH .
    2. Unlock all subscriptions:

      # for domain in `MYSQL_PWD=\`cat /etc/psa/.psa.shadow\` mysql -u admin psa -sNe"select name from domains where webspace_id=0"`; do /usr/local/psa/bin/subscription --unlock-subscription $domain; done

    3. Synchronize subscriptions with their plan:

      # for domain in `MYSQL_PWD=\`cat /etc/psa/.psa.shadow\` mysql -u admin psa -sNe"select name from domains where webspace_id=0"`; do /usr/local/psa/bin/subscription --sync-subscription $domain; done

  • For Windows-based servers
    1. Login to the server via RDP .

    2. Press Win+R on keyboard to open Run window, type 'cmd' and click OK.
    3. Unlock and synchronize subscriptions with their plan:

      # for /F "tokens=*" %S in ('plesk bin subscription.exe --list') do plesk bin subscription --unlock-subscription %S & plesk bin subscription --sync-subscription %S

Have more questions? Submit a request

2 Comments

  • 0
    Avatar
    Bryan Williams

    with not run with the "*" at the end and returns:

    'ERROR 1045 (28000): Access denied for user 'admin'@'localhost' (using password: NO)
    Wrong syntax for command's '-unlock-subscription' parameter
    [\cat]

    Wrong syntax for command's '-unlock-subscription' parameter
    [/etc/psa/.psa.shadow]'

    Without the "*" any thoughts?

  • 0
    Avatar
    Bulat Tsydenov

    @Bryan Thank you for bringing this to our attention! The article was modified correspondingly, now all commands are valid.

Please sign in to leave a comment.