Have you ever wanted to export all of your settings from ColdFusion but didn’t think you could? What if you had to reinstall your server for some reason, or simply wanted to backup your settings? What if you wanted to move your configuration to another server? Well, many people don’t know that it’s very easy.
Follow these instructions to export your settings:
- Login to the ColdFusion administrator
- Click Archives and Deployments under the Server Settings section in the left hand navigation menu. This screen will let you create an archive of settings. Ostensibly, the purpose of this is to export settings for a single application. However, you can use it to export all of your settings (and import them too!)
- In the Create New Archive form type an archive name. I typed “My Settings”. Click create. The page refreshes and you see your new archive listed in the Current Archives Definition List.
- Click the edit icon (the pencil and paper) to the left of your archive. This opens a popup window where you can select the settings you want to export. You can give this a description if you want. Simply click the Select All button to select all the settings on your server. (I think this might be the default.) If you don’t want to export all your settings go though the items on the left of this window and select what you do want to export. When done click Close Window. You archive has now been configured.
- To export your archive click the Build icon (looks like a pyramid and paper, to the right of the edit icon). This opens another popup window. The first page reviews the settings you’re exporting. Click the next link in the lower right corner. The next page ask where you want to create the archive. I tend to just stick these in the root of my C: drive. You have to name the file with a “.car” extension. I called mine c:settings.car.
- Click next again. The archive is created and you will receive a popup indicating that it was successful. You will now have a file on your server wherever you indicate it should be created! This can be backed up, emailed, copied, or whatever.
Follow these instructions to restore your archive:
- Login to the ColdFusion administrator
- Click Archives and Deployments under the Server Settings section in the left hand navigation menu.
- Type the path to your .car file in the Deploy an Existing Archive section. Click Deploy.
- Review the settings in the popup window.
- Click next in the lower right corner. Your settings will be deployed to your server.
This can be VERY useful when working with a large number of clustered ColdFusion servers. Imagine manually adding a data source to 10 servers without messing something up! All you need do now is type them in one location, export your settings and import on 9 other servers.
Posted In: Blog