web stats
Auto back up of Mirth Channels and Complete Config file - Mirth Community

Go Back   Mirth Community > Mirth Connect > Development

Reply
 
Thread Tools Display Modes
  #1  
Old 10-22-2018, 06:44 AM
bandheli bandheli is offline
Mirth Newb
 
Join Date: Jul 2017
Posts: 9
bandheli is on a distinguished road
Default 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
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 01:28 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2019, vBulletin Solutions, Inc.
Mirth Corporation