-
Notifications
You must be signed in to change notification settings - Fork 6
BackupDatabase
zerovian edited this page Feb 26, 2020
·
12 revisions
plugins {
id "oe.espresso.latte" version "<version>"
}
import oe.espresso.latte.*
task createDB(type: CreateDatabase) {
dbName = "sports2020"
destDir = "${buildDir}/db"
sourceDb = "$System.env.DLC/sports2020"
largeFiles = true
}
task backupDatabase(type: BackupDatabase) {
dependsOn createDB
source = "${buildDir}/db/sports2020.db"
target = "${buildDir}/db/sports2020.bk"
overwrite = true
}Use the command ./gradlew backupDatabase to run this example.
If successful, there should be a sports2020.bk file in build/db/ of your project.
| Property | Required | Description | Default Value |
|---|---|---|---|
| source | Yes | Path to the database where the .db is located | None |
| target | Yes | Path of the backup file for the database. | None |
| overwrite | No | Overwrite the target file if it exists. If this isn't specified, and the file already exists, the build will fail | False |
| online | No | Indicates the database must be online or not when doing a backup. If not set, proutil -C holder is used to detect if the database is up. Leave this out if you want the task to auto detect if this option should be used. | Auto |
| incremental | No | Performs an incremental backup. | False |
| DLC | No | Path to where OpenEdge installation is located. If not specified, the $DLC environment variable is used. | System.env.DLC |