Giter VIP home page Giter VIP logo

mirth-backup's Introduction

Creates a backup of a mirth configuration

Code Template: Automatic Mirth Backup

Purpose:
This code template creates a backup of a mirth configuration like if you click "backup config" in the settings tab of the mirth administrator and stores it in the filesystem.

It backs up the whole mirth configuration and also the configuration map. Everything is compressed into a zip archive and can optionally be secured with 256bit AES encryption.

Parameters:
  • username
    The username that the channel should use to connect to the server that should be backed-up. Dedicated user is recommended.
  • password
    The password that the channel should use to connect to the server that should be backed-up.
  • server
    The ip or name of the mirth server that should be backed-up. It can also contain a custom port (default is 8443). This parameter will become part of the backup name.
  • backupFolder
    Path to the folder where the backup should be created. None-existing parts of the path will be created. Further, all backups of the same day will be placed in a dedicated subfolder.
  • archivePassword
    If a password is set, the resulting archive will be secured by 256bit AES encryption (Optional)

Examples:
Create a backup archive without encryption:

backupMirthServer('admin', 'admin', 'MyMirthProdInstance', 'c:\temp');

Create a 256bit AES encrypted backup archive:

backupMirthServer('admin', 'admin', 'MyMirthProdInstance', 'c:\temp', 'MySecurePassword!');

Configuration:

  1. Place the zip4J library in the custom-lib folder of mirth. (It is needed for zip encryption - further info can be found on the website)
  2. Press the button "Reload Resources" under Settings -> Resources in Mirth Administrator
  3. Import the attached code templates

Code Template: Cleanup Directory

Purpose:
Intelligently remove outdated backups from your backup folder to avoid exceeding the capacity of the backup drive.

This function should be called in the backup channel after all Mirth servers have been backuped.

Parameters:

  • path
    The path to the directory that should be cleaned up. (This usually is the path of the backup folder)
  • maxFileAge
    Subdirectories that are older than the here specified number of days (1st day is today) will be deleted if number of resulting directories is not below the minimum specified by minNumberOfBackups
  • minNumberOfBackups
    The minimum number of backups that should be kept even if the maximum file age is exceeded (optional)

Examples:
Remove all backups that are older than 40 days:

cleanupDirectory('c:\temp', 40);

Remove all backups that are older than 20 days but retain at least the 10 last backups:

cleanupDirectory('c:\temp', 20, 10);

mirth-backup's People

Contributors

odoodo avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.