Backup the data for the EDB measures of a master workbook.
generate_index is true, the result of this task will be a new folder under backup_root whose name is a timestamp in the format YYYYMMDD_HHmmss (e.g. 20150520_062848). This folder will contain a
backup-spec.proto file with the specification for the backup, and a set of csv files for the data. Also, the backup_root will also contain a
latest_backup.txt file with the timestamp of the latest backup. This file can be used by
lb.wb.RecoverWorkbook to locate the data files and specification to recover. Note that currently all files are stored in gzip format.
generate_index is false, then the backup_root folder itself will be used to store
backup-spec.proto and the set of csv files. No
latest_backup.txt will be generated.
app_prefix a URI path to construct the service URI. This is the prefix used when configuring workbook services (via lb:web:workbooks:config:app_prefix) or the modeler (via modeler_config:services:prefix:master). E.g.
backup_root the location where the backup is to be stored. If generate_index is true, this should be a directory or cloud store location where the index and a new folder will be created for the backup; otherwise, it should point to the place where the data will be stored. Avoid trailing slashes.
generate_index whether the task should generate an index file in backup_root containing the timestamp of the latest backup. This is useful to allow
lb.wb.RecoverWorkbook to lookup the latest backup when recovering.
skip_not_derived whether the task should skip predicates marked as NOT_DERIVED
transport the transport used to execute service calls. This is used both to lookup the backup specification service as well as the dynamic TDX services exposed by the workbook framework.
async whether to use the asynchronous transaction protocol when exporting the backup data. This is highly recommended as it uses much fewer resources than the synchronous protocol.
poll_delay when using the asynchronous transaction protocol, the client will send all the specification of the files to import in a transaction and will then start polling until the transaction is over. This parameter determines the duration to wait between polls. Note that the client polls immediately after the commit requests returns, so short transactions may never need to wait.
backup_service the service to call in order to get a backup specification. If not set, the default will be the concatenation of app_prefix and
"/backup-cri", which is the prefix exposed by the workbook framework by default.
txn_service the transaction service to use when exporting the backup files. If not set, the default will be the concatenation of app_prefix and
"/workbooks/txn", which is the prefix exposed by the workbook framework by default. A transaction service is always used, to ensure that a consistent snapshot is exported.
key the alias of the encryption key to be used when sending data to cloud store locations.
txn_timeout the timeout for the transaction that exports data, in seconds.
task lb.wb.BackupMasterWorkbook( app_prefix, backup_root, generate_index = true, skip_not_derived = false, transport = "http://localhost:55183", async = true, poll_delay: Duration?, backup_service?, txn_service?, key?, txn_timeout: Duration = "6000s", driver_meta? ) extends AsyncTask( driver_meta = $driver_meta, task_implementation_class = "com.logicblox.workflow.task.wb.BackupMasterWorkbook" )