Virtualmin templates/plan replication

Is there any way to replicate plans and templates to other virtualmin hosts, short of backup/restore?

And on the same subject, are the templates and plans "variablized" to the point where they could be replicated between virtualmin hosts?

Thanks.

Status: 
Closed (fixed)

Comments

Howdy -- whenever you generate a Virtualmin backup, it will by default create a "virtualmin.tar.gz" file -- that contains your Virtualmin settings, templates, plans, backups, and the like. Restoring that file onto another server is one way to migrate templates and plans, but you get all Virtualmin settings, not just templates/plans.

Another way would be to simply copy the /etc/webmin/virtual-server/templates and /etc/webmin/virtual-server/templates directories -- it's no problem to copy those from one server to another.

Will one of those do what you're after?

That will indeed. Honestly I was hoping it would be something that be done through like cloudmin physical..(feature request I guess).

"Another way would be to simply copy the /etc/webmin/virtual-server/templates and /etc/webmin/virtual-server/templates directories -- it's no problem to copy those from one server to another."

Do you mean /etc/webmin/virtual-server/templates and /etc/webmin/virtual-server/template-scripts? or just templates?

IIRC, I could get most options within the template to not need manual tweaking after copy, with the exception of "web_admindom". Is there a variable for "this host? For example, if I copy a template from serverA to serverB, and web_admindom is set to "https://$THISSERVER$:10000"

Feel free to point me to documentation I'm not searching well enough for! I believe when I came across the template variable list before, it didn't include anything like that.

Well, some of those sound like "Jamie" questions :-)

I'm not sure about the "template-scripts" directory, that doesn't exist on my test systems, so I'm not sure what that contains. The only thing I know for sure is that the "templates" directory contains the server templates, and the "plans" directory contains the account plans.

I don't believe there is a variable containing the system's hostname -- I don't see it listed in the documentation or in the data files in /etc/webmin/virtual-server... however, that sounds like a useful feature, so perhaps there is one in there somewhere -- or if not, you may be able to convince Jamie to add it :-)

Would love to ask, or try to convince him... is this issue something he'll review or should I employ another mode of contact?

The template-scripts directory contains the details of scripts that are automatically installed into a new domain.

Regarding the hostname, you can use the variable $HOSTNAME for this.

Jamie, does $HOSTNAME reflect the hostname from the os? Is there a way to configure this, or add one that allows for configuration? A case i'm thinking of is for the admin url, if I have an SSL cert for web.mydomain.com, but $HOSTNAME reflects hostname.mydomain.com, the client will get an SSL error.

It is always the hostname from the OS. If you want the name of the domain being created, use $VIRTUALSERVER_DOM instead.

Alternately, you can define additional template variables that can be used in all messages at System Customization -> Global Variables.

Outstanding. Works for me. Gives one simple place to make a change when templates and/or plans are copied or moved from host to host.
Now, any chance of getting a simple, direct way to do just that? Copy/move templates and/or plans only?

Here' s my intention: I run WHMCS, with a few backend vmin pro and gpl hosts, along with a cloudmin host. I'd love that when I make an adjustment to a plan or template, then I could easily..

NEVERMIND. You know, everytime I go looking for extra functionality, I find it within current features.

I'm going to use cluster file copy for this. Seems like the perfect fit, with scheduling even.

Thanks! Closing issue.