Announcement

Collapse
No announcement yet.

Auto back up of Mirth Channels and Complete Config file

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Auto back up of Mirth Channels and Complete Config file

    Below is the bat file script to take channels and complete config file back of mirth.


    for /F "tokens=2-5 delims=/ " %%i in ('date /t') do (
    set day=%%j
    set month=%%i
    set Year=%%k
    )
    set MirthcfgDir=C:\Mirth_backup\Channels
    set channelDir=C:\Mirth_backup\Channels\%Year%-%month%-%day%

    mkdir %channelDir%

    echo exportcfg "%channelDir%\completeConfig-%Year%-%month%-%day%.xml" > C:\Mirth_Backup\backup_cfg.txt
    echo export * "%channelDir%\" >> C:\Mirth_Backup\backup_cfg.txt
    "C:\Program Files\Mirth Connect New Version\Mirth Connect\mccommand.exe" -s C:\Mirth_backup\backup_cfg.txt

    --------------
    Put above code in Sample.bat and run. You will get back of Mirth channels and complete config file so that you can easily import into other environments.
    Just make sure that you change this directory according to your mirth installation.
    "C:\Program Files\Mirth Connect New Version\Mirth Connect\mccommand.exe" -s C:\Mirth_backup\backup_cfg.txt
Working...
X