You might want to revert when a workflow is accidentally erased, overwritten, or when unwanted changes are made and saved to the workflow. In order to restore a project from the CLI, you have to first download the version you want using the revision ID, then push the version back into Treasure Data.
Workflow name
- From the command line using TD Toolbelt, issue a command in the following format:
td wf download <workflow_name> -r <revision_id>- For example, if the workflow you wanted to revise is named ‘sales_data‘ and Revision ID representing the version you wanted to revert to is
e295f5ff3ac4482a991b92db8fa0a8e0, then the command you issue is:
td wf download sales_data -r e295f5ff3ac4482a991b92db8fa0a8e0- A folder containing the workflow at the specified revision point is downloaded to the current working directory.
- Change your current directory to the folder that you just downloaded. Then, issue a command as follows:
td wf push workflow_name- For example, if your workflow is named ‘sales_data‘, then the command you issue is:
td wf push sales_dataNote that the name of the workflow you are pushing to Treasure Data must match the name of the workflow that you want to revert. After issuing the push command, the workflow is updated to the Revision ID specified in your download command.