Changing Subscription Expiry Dates at Once for all Suspended domains

Created:

2016-11-16 12:56:05 UTC

Modified:

2017-04-24 12:07:03 UTC

0

Was this article helpful?


Have more questions?

Submit a request

Changing Subscription Expiry Dates at Once for all Suspended domains

Applicable to:

  • Plesk 11.5 for Windows
  • Plesk 11.5 for Linux

Question

How to change Subscription Expiry Dates at once for all suspended domains.

Answer

Linux:

# mysql -uadmin -p`cat /etc/psa/.psa.shadow` psa -Nse"select name from domains where status!=0 and webspace_id =0" | while read i; do /usr/local/psa/bin/domain_pref -u $i -expiration -1; /usr/local/psa/bin/subscription --webspace-on; done

Windows:

  1. Retrieve the list of expire subscription names from database:

    "%plesk_bin%"\\dbclient.exe --direct-sql --sql="select name from domains where status!=0 and webspace_id =0" | more +1 > c:\\expire_subscription.txt
  2. Execute the below given utility to change the expiration dates for above listed subscription:

    cd %plesk_cli%
    for /f %i in (C:\\expire_subscription.txt) do domain_pref.exe -u %i -expiration -1
  3. Activate the same listed subscriptions:

    cd %plesk_cli%
    for /f %i in (C:\\expire_subscription.txt) do subscription.exe --webspace-on %i

With the steps described above you will be able to enable all the expired subscriptions on server. Further you can follow steps below to enable and activate domains under these subscription.

    cd %plesk_bin%
dbclient.exe --direct-sql --sql="select name from domains where status !=0 and webspace_id !=0" | more +1 > c:\\expire_domains.txt
cd %plesk_cli%
for /f %i in (c:\\expire_domains.txt) do domain.exe --on %i
Have more questions? Submit a request
Please sign in to leave a comment.