Help Changing Templates

I have a server with 575 sites… I have changed the template over the years… And now some of the sites
list a template that has been removed.

I need a way to update all the templates… I see the update servers will let you change accounting plans but not server templates…

IS THEIR NO WAY TO DO A MASS UPDATE OF TEMPLATES ?

Thanks
Don

Howdy,

With the way Server Templates work – there isn’t actually a benefit to changing it, once the domain is created.

The Server Template is only used during the process of creating a domain.

Account Plans are different though – Account Plans are active, and in use perpetually… so there’s a way to modify that at any time if need be.

It’s possible to mass-change the Server Template using the Virtualmin API. You can do that by looping over all the domains using a given template, and then calling the modify-domain function and passing in your desired template.

However, there’s no benefit to doing that, as changing the Server Template after the domain is created doesn’t change anything in the domain.

-Eric

There are some cases when the template is still used after domain creation: E.g. when you turn features off/on, like when recreating a DNS zone by toggling that feature. So I do consider having the correct template assigned to domains as noteworthy. :slight_smile:

Very True… The Wrong Templates create problems…

logrotate.conf is one of the places I have issues… That fixing the templates I hope will correct…

I could deal with having them ALL set to the same correct one… A new copy of the last “Default” with it changes…

I was looking for something like…

virtualmin modify-domain --domain domain.name --template name|Id

Thanks