Placing multiple domains into maintenance mode with one command

Ask questions about your setup or get help installing ZCS server (ZD section below).
csmallwood
Posts: 2
Joined: Tue Jul 17, 2018 2:26 pm

Placing multiple domains into maintenance mode with one command

Postby csmallwood » Tue Jul 17, 2018 2:36 pm

I am currently running the 8.8.8_GA_2009.RHEL6_64_20180322150747 RHEL6_64 FOSS edition and I have 23 separate domains currently active on my server. I want to place them all in maintenance mode without running a command for each domain. I found the following command

Code: Select all

zmprov md <domain> zimbraDomainStatus maintenance
and tried it with regex by replacing the domain with '*.com" and it returns an error that says "No such domain *.com". Is there a way for me to place all of my domains into maintenance mode with one command? Thanks in advance.


User avatar
fs.schmidt
Advanced member
Advanced member
Posts: 118
Joined: Sat Sep 13, 2014 3:37 am
Location: Brazil
Contact:

Re: Placing multiple domains into maintenance mode with one command

Postby fs.schmidt » Sun Jul 22, 2018 1:37 am

Hi,

You can try to create a file with all your domains and run a single zmprov:

domains_maintenance.txt:

Code: Select all

md domain1.com zimbraDomainStatus maintenance
md domain2.com zimbraDomainStatus maintenance
md domain2.com zimbraDomainStatus maintenance


$ zmprov -f domains_maintenance.txt
csmallwood
Posts: 2
Joined: Tue Jul 17, 2018 2:26 pm

Re: Placing multiple domains into maintenance mode with one command

Postby csmallwood » Sun Jul 22, 2018 9:12 pm

Thanks fs.schmidt, I'll try that. Appreciate your help.

Return to “Installation and Upgrade”

Who is online

Users browsing this forum: No registered users and 17 guests