Applicable to:
- Plesk for Linux
- Plesk for Windows
Question
A subscription is flagged with a blue lock saying:
PLESK_INFO: The subscription is locked for synchronization: It is excluded from syncing with the service plan because the subscription parameters were customized.
How to synchronize locked subscriptions with their service plans?
Answer
-
Go to Subscriptions > example.com.
-
Click Unlock & Sync in the Account section on the right.
-
In Plesk for Linux
-
Connect to a Plesk server via SSH.
-
Create a list with all locked subscriptions:
# plesk db -sNe "select name from domains d INNER JOIN Subscriptions s ON d.id=s.object_id where d.webspace_id=0 AND s.object_type='domain' AND s.locked='true'" > /root/locked_subscriptions.txt
-
Unlock subscriptions from the generated list:
# for domain in `cat /root/locked_subscriptions.txt`; do /usr/local/psa/bin/subscription --unlock-subscription $domain; done
-
Synchronize these subscriptions with their service plans:
# for domain in `cat /root/locked_subscriptions.txt`; do /usr/local/psa/bin/subscription --sync-subscription $domain; done
-
(Optional) Check that no unsynced subscriptions left. The following command should return empty output:
# plesk db -sNe "select name from domains d INNER JOIN Subscriptions s ON d.id=s.object_id where d.webspace_id=0 AND s.object_type='domain' AND s.synchronized='false'"
-
-
In Plesk for Windows Server
-
Connect to the Plesk server via RDP.
-
Create a list with all locked subscriptions:
C:\> plesk db -sNe "select name from domains d INNER JOIN Subscriptions s ON d.id=s.object_id where d.webspace_id=0 AND s.object_type='domain' AND s.locked='true'" > locked_subscriptions.txt
-
Unlock and synchronize subscriptions from the generated list:
C:\> for /f %i in (locked_subscriptions.txt) do plesk bin subscription --unlock-subscription %i & for /f %i in (locked_subscriptions.txt) do plesk bin subscription --sync-subscription %i
-
(Optional) Check that no unsynced subscriptions left. The following command should return empty output:
C:\> plesk db -sNe "select name from domains d INNER JOIN Subscriptions s ON d.id=s.object_id where d.webspace_id=0 AND s.object_type='domain' AND s.synchronized='false'"
-
Comments
4 comments
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?
@Bryan Thank you for bringing this to our attention! The article was modified correspondingly, now all commands are valid.
After running the commands for Linux, does the second command leave the server as it was? i noticed that when i ran the first command it said it was unlocking all the subscriptions (over 200) then when i ran the 2nd command it ran ok and synced all the subscriptions but i was expecting it to say they were locked.Put my mind at rest please.
Hello Paul,
Subscription is locked when you modify it's limits/settings directly in subscription. So there is a difference in limits/settings between subscription and service plan.
First command unlocks subscription and makes them available for synchronization.
The second command sync them with service plan - sync limits/parameters between service plan and subscriptions.
Please sign in to leave a comment.