No announcement yet.

Backing up Code Templates on a daily bases?

  • Filter
  • Time
  • Show
Clear All
new posts

  • Backing up Code Templates on a daily bases?

    Does anybody have a script that would backup "Code Templates" on a daily bases? I have one for "Channels" but cannot figure out how to do one for the code templates only. I'm using Mirth & SQL 2008 in a windows environment.

    Any help on this matter would be greatly appreciated!!



  • #2
    As with anything, there are a variety of ways this can be done.... You could set up a service (either within or without Mirth) to query from your database and backup the code_template table that way. You could also use the Mirth CLI, by passing it "-s scriptfilename", and having a script containing "exportcodetemplates outfilename". You can do this outside of Mirth with a service that calls mccommand, or inside of Mirth with a channel that creates an instance of CommandLineInterface with the appropriate arguments. Yet another way to do it is do create a Client or CodeTemplateController, get a List of CodeTemplate objects, and then extract the relevant data that way.

    Hope that helps!
    Step 1: JAVA CACHE...DID YOU CLEAR ...wait, ding dong the witch is dead?

    Nicholas Rupley
    Work: 949-237-6069
    Always include what Mirth Connect version you're working with. Also include (if applicable) the code you're using and full stacktraces for errors (use CODE tags). Posting your entire channel is helpful as well; make sure to scrub any PHI/passwords first.

    - How do I foo?
    - You just bar.


    • #3
      Thanks for the feedback...This looks like it might be helpful, I'll have to try some of your technique's out.!

      Thanks again!