• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Question CLI: Domain-Lock?

omexlu

Regular Pleskian
Hello,

I want to make some bash-script who make a tarball backup from a specific folder.
Is it somehow possible to block a domain via CLI ("503" redirection)?

And how activate after them?

Thanks in advance.
 
# plesk bin domain --suspend domain.com
# plesk bin domain --on domain.com
 
# plesk bin domain --suspend domain.com
# plesk bin domain --on domain.com

Just some question if i have few rows in my bash script who have this command-lines there are no conflict if they are maybe executed "fast" on after one? (maybe with apache restart or some else)
 
Just some question if i have few rows in my bash script who have this command-lines there are no conflict if they are maybe executed "fast" on after one? (maybe with apache restart or some else)
Yes, it would be useful to set up delay there between these commands.
 
This may depend on many factors, so, try to find it experimentally.

Okay thank you maybe it is possible to disable multiple domains on one command to minimize this problem?
So there is one command at start at one command at end and apache only need to restart twice?
 
Okay thank you maybe it is possible to disable multiple domains on one command to minimize this problem?

for i in `mysql -uadmin -p\`cat /etc/psa/.psa.shadow\` psa -Ns -e "select name from domains"`; do /usr/local/psa/bin/domain --suspend $i; done

"select name from domains" you can change with more specific SQL query for selected domains.
 
Thanks you, something like not possible?
# plesk bin domain --suspend domain.com domain2.com domain3.com domain4.com domain5.com
# plesk bin domain --on domain.com domain2.com domain3.com domain4.com domain5.com
 
It is impossible. And what if you have 125 domains? :)

Its only for 5 domains on my privat-projects (not for webhosting) :D

So there is only one query at start and on at end of the bashscript, but in this case the websites who tarbar and mysqldump is already finish as disabled until all are finish.
 
Back
Top