Initializing and Restoring
As of Obsidian 3.0.0
At times, you may wish to perform initialization, backup or restoration of an Obsidian configuration. For example, you may wish to take a known good configuration from a development environment and apply it to a test environment.
In Obsidian 3.0.0, we introduce an expansion of our Initializing Job Schedules support that leverages the System Restore functionality of our API.
By default, Obsidian will look for a file on the classpath named /obsidianInitialization.json. You may override the classpath resource name using the system property obsidianInitClasspath. For example, you could add the java system property -DobsidianInitClasspath=/com/mycompany/obsidianInit.json. You can also use a file-based resource by using the system property obsidianInitFile. For example, you could add the java system property -DobsidianInitFile=/var/obsidian/obsidianScheduleInitialization.json.
Note: Initialization only runs on scheduler instances. This means that a standalone Obsidian web application with no scheduler running will not do any initialization based on the presence of the appropriate JSON file.
{
"jobs" : [
{
"jobClass": "com.carfey.ops.job.maint.LogCleanupJob",
"nickname": "Daily Debug Log Cleanup",
"recoveryType": "NONE",
"state": "ENABLED",
"schedule": "@daily",
"parameters": [
{
"name": "level",
"type": "STRING",
"value": "DEBUG"
},
{
"name": "maxAgeDays",
"type": "INTEGER",
"value": "7"
}
]
},
{
"jobClass": "com.carfey.ops.job.maint.LogCleanupJob",
"nickname": "Weekly Info Log Cleanup",
"recoveryType": "NONE",
"state": "ENABLED",
"schedule": "@weekly",
"parameters": [
{
"name": "level",
"type": "STRING",
"value": "INFO"
},
{
"name": "maxAgeDays",
"type": "INTEGER",
"value": "30"
}
]
}
]
}