Is there a way to migrate the Admin settings of a ...
# lucee
r
Is there a way to migrate the Admin settings of a non-CommandBox (no access to cfConfig) Lucee server to another? I know I can
Settings > Export
to create an
Application.cfc
template but that doesn’t populate the Admin settings to then allow me to capture the settings in cfConfig for later. Is there an XML file somewhere I can copy? Or something like the ACF .car files?
r
I believe CFConfig will export from a running CF server if you give it the server home path.
f
There is a
lucee-server.xml
I think you can just copy it to another server, but not 100% sure if there are any potential pitfalls to that approach
r
help cfconfig export
even has an example to do what you want.
Sorry, I completely misread your original question.
That's what I get for trying to read without my glasses, while they get repaired. 😕
r
Hummm, interesting, I’ll look into that Rodney. I did wonder if there’s something like that Pete, I’ll take a look. Thanks both for those leads. I’m looking to move some non-CommandBox servers over to CommandBox hosted instances.
Yes, I don’t think that will work Rodney. Currently looking at reverse engineering cfConfig to see how it sources it’s data to export. Might be a lead.
b
@richard.herbert Do you not have the option to install CommandBox (even temporarily) on the server?
In theory, just • drop on CommandBox and CFConfig • export the settings into a JSON file • optionally remove CommandBox then if you like
If that's not an option, then Pete's suggestion is the next best thing. Grab the XML files and drop them into another Lucee server somewhere and restart
That can be a little tricky since there may be information in the XML files specific to that Lucee installation and its extensions, etc, but generally speaking most of the config should be fine
That would be a worst case scenario to just put the XML file in a place where you could extract its config into JSON
The CFConfig service layer can also be run in any CFML app directly and you can ask the service layer to extract the config. That sounds like more work than just installing CommandBox and CFConfig temporarily though, lol.
r
So I can point CFConfig to a non-CommandBox server? One currently running under a “traditional” install?
b
Yes, of course!
That's what everyone has been saying here
It's all in the docs
r
Sorry, I hadn’t appreciated the power of CFConfig to support non-CommandBox site, my bad - RTFM kids!
👍 2
“_Oh Richard, I don’t think we mentioned this, this is not a Lucee site, it’s an Adobe ColdFusion 8 site. There’re both the same, right?_” 🤯 I know both CommandBox and CFConfig start support from ACF9, so I guess it’ll be an experiment to see if it works with 8?
b
Wow, that's old
The XML file format is pretty much the same all the way back to CFMX6
You can force CFConfig to use an
adobe@9
format and there's a good chance it will work
I just never went back farther than CF8 because I never needed it!
r
Phew, that’s what I was hoping. At least by the end of this process there’s be one less ACF8 site in the wild! Thanks again for your insight.
b
So it would be something along the lines of
Copy code
CommandBox> cfconfig show from=C:/coldfusion8/cfusion fromFormat=adobe@9
👍 1
If that shows the config JSON, then you can do
Copy code
CommandBox> cfconfig export from=C:/coldfusion8/cfusion fromFormat=adobe@9 to=mySettings.json
I just made up that folder path off the top of my head-- double check what it needs to be
r
Sure, I understand the sample
👍 1
b
That version of CF8 probably is on a version of Java before Java 8 so you'll likely want to grab the JRE-included version of CommandBox
👍 1