From f02385cc30c55d94cb654a83cdd9653a814c3cf4 Mon Sep 17 00:00:00 2001 From: annatisch Date: Mon, 20 Mar 2017 14:20:56 -0700 Subject: [PATCH] Added download docs --- README.rst | 5 +++++ doc/outputFiles.md | 26 +++++++++++++++++++++++--- 2 files changed, 28 insertions(+), 3 deletions(-) diff --git a/README.rst b/README.rst index 7f889ca..e1eabf1 100644 --- a/README.rst +++ b/README.rst @@ -32,6 +32,11 @@ Input data stored in linked storage under a file group can be simply referenced When adding a task, you can now declare a list of output files to be automatically uploaded to an Azure Storage container of your choice when the task completes. +`Download job outputs from directly from storage `_ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +A new command to allow a user to download job output files from a file group in the storage account linked to their Azure Batch account. + `Pool and job templates with parameterization `_ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ diff --git a/doc/outputFiles.md b/doc/outputFiles.md index 841ab70..0fc780d 100644 --- a/doc/outputFiles.md +++ b/doc/outputFiles.md @@ -24,9 +24,9 @@ An output file description can be added to a task or Job Manager task (or the ta { "filePattern": "../stderr.txt", "destination": { - "container": { - "path": "2_error.log", - "containerSas": "https://storage.blob.core.windows.net/container?sv=2015-04-05sig=tAp0r3I3SV5PbjpZ5CIjvuo1jdUs5xW" + "autoStorage": { + "path": "ffmpeg/2_error.log", + "fileGroup": "job-logs" } }, "uploadDetails": { @@ -82,6 +82,26 @@ Available options for `taskStatus` are: * `TaskFailure` - Upload if the task completed with a nonzero exit code. * `TaskComplete` - Uploaded always (irrespective of the exit code of the task). +## Output File Download + +Output files that have been persisted to auto-storage using a file group can be downloaded using an additional CLI command: + +```bash +az batch file download --local-path C:\job_outputs\logs --file-group job-logs + +az batch file download --local-path /home/job_outputs/logs --file-group job-logs +``` + +If output files were persisted into a subfolder in the file group, this can be specified using the +`--remote-path` flag. If a file of the same name already exists locally, it will not be overwritten by +default. To overwrite any existing files, use the `--overwrite` flag. + +```bash +az batch file download --local-path C:\job_outputs\logs --file-group job-logs --remote-path ffmpeg --overwrite + +az batch file download --local-path /home/job_outputs/logs --file-group job-logs --remote-path ffmpeg --overwrite +``` + ## Samples The following samples automatically upload their output files as they complete: