Skip to content

Commit 598818d

Browse files
committed
- fix use exact name not working
- documentation updates
1 parent fe5c66e commit 598818d

File tree

11 files changed

+243
-130
lines changed

11 files changed

+243
-130
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ Sources and targets are decoupled, this design enables the composition of variou
2929
Download, extract and set permissions:
3030

3131
```bash
32-
wget -O bp_linux.tar.gz https://github.com/Azure/blobporter/releases/download/v0.6.10/bp_linux.tar.gz
32+
wget -O bp_linux.tar.gz https://github.com/Azure/blobporter/releases/download/v0.6.12/bp_linux.tar.gz
3333
tar -xvf bp_linux.tar.gz linux_amd64/blobporter
3434
chmod +x ~/linux_amd64/blobporter
3535
cd ~/linux_amd64
@@ -46,7 +46,7 @@ export ACCOUNT_KEY=<STORAGE_ACCOUNT_KEY>
4646
4747
### Windows
4848

49-
Download [BlobPorter.exe](https://github.com/Azure/blobporter/releases/download/v0.6.10/bp_windows.zip)
49+
Download [BlobPorter.exe](https://github.com/Azure/blobporter/releases/download/v0.6.12/bp_windows.zip)
5050

5151
Set environment variables (if using the command prompt):
5252

args.go

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,8 @@ func (p *paramParserValidator) parseAndValidate() error {
174174
p.pvgDupCheck,
175175
p.pvgParseBlockSize,
176176
p.pvgQuietMode,
177-
p.pvgKeepDirectoryStructure)
177+
p.pvgKeepDirectoryStructure,
178+
p.pvgUseExactMatch)
178179

179180
if err != nil {
180181
return err
@@ -257,6 +258,11 @@ func (p *paramParserValidator) getSourceRules() ([]parseAndValidationRule, error
257258
//**************************
258259

259260
//Global rules....
261+
func (p *paramParserValidator) pvgUseExactMatch() error {
262+
p.params.useExactMatch = p.args.exactNameMatch
263+
return nil
264+
}
265+
260266
func (p *paramParserValidator) pvgTransferStatusPathIsPresent() error {
261267

262268
if p.args.transferStatusPath != "" {

docs/conf.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
# import os
1616
# import sys
1717
# sys.path.insert(0, os.path.abspath('.'))
18-
18+
import sphinx_bootstrap_theme
1919

2020
# -- Project information -----------------------------------------------------
2121

@@ -75,6 +75,8 @@
7575
# a list of builtin themes.
7676
#
7777
html_theme = 'sphinx_rtd_theme'
78+
#html_theme = 'bootstrap'
79+
#html_theme_path = sphinx_bootstrap_theme.get_html_theme_path()
7880

7981
# Theme options are theme-specific and customize the look and feel of a theme
8082
# further. For a list of options available for each theme, see the

docs/examples.rst

Lines changed: 91 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,52 @@
1-
========
21
Examples
32
========
43

4+
55
Upload to Azure Block Blob Storage
6-
-------------------------------------------
6+
-----------------------------------
77

88
Single file upload:
99

10-
``./blobporter -f /datadrive/myfile.tar -c mycontainer -n myfile.tar``
10+
::
11+
12+
./blobporter -f /datadrive/myfile.tar -c mycontainer -n myfile.tar
1113

12-
**Note:** If the container does not exist, it will be created.
14+
.. note:: BlobPorter will create the container if it doesn't exist.
1315

1416
Upload all files that match the pattern:
1517

16-
``./blobporter -f "/datadrive/*.tar" -c mycontainer``
18+
::
19+
20+
./blobporter -f "/datadrive/*.tar" -c mycontainer
1721

1822
You can also specify a list of files or patterns explicitly:
1923

20-
``./blobporter -f "/datadrive/*.tar" -f "/datadrive/readme.md" -f "/datadrive/log" -c mycontainer``
24+
::
25+
26+
./blobporter -f "/datadrive/*.tar" -f "/datadrive/readme.md" -f "/datadrive/log" -c mycontainer
2127

2228
If you want to rename the target file name, you can use the -n option:
2329

24-
``./blobporter -f /datadrive/f1.tar -n newname.tar -c mycontainer``
30+
::
31+
32+
./blobporter -f /datadrive/f1.tar -n newname.tar -c mycontainer
2533

2634
Upload to Azure Page Blob Storage
27-
--------------------------------------
35+
----------------------------------
2836

29-
Same as uploading to block blob storage, but with the transfer definiton (-t option) set to ``file-pageblob``.
37+
Same as uploading to block blob storage, but with the transfer definiton (-t option) set to ``file-pageblob``. For example, a single file upload to page blob:
3038

31-
For example, a single file upload to page blob:
39+
::
3240

33-
``./blobporter -f /datadrive/mydisk.vhd -c mycontainer -n mydisk.vhd -t file-pageblob``
41+
./blobporter -f /datadrive/mydisk.vhd -c mycontainer -n mydisk.vhd -t file-pageblob
3442

35-
**Note:** The file size and block size must be a multiple of 512 (bytes). The maximum block size is 4MB.
3643

37-
Transfer Data from an S3 endpoint to Azure Storage
38-
--------------------------------------------------
44+
.. note:: The file size and block size must be a multiple of 512 (bytes). The maximum block size is 4MB.
3945

40-
You can upload data from an S3 compatible endpoint.
46+
Transfer data from S3 to Azure Storage
47+
---------------------------------------
48+
49+
You can transfer data from an S3 compatible endpoint.
4150

4251
First you must specify the access and secret keys via environment variables.
4352

@@ -48,71 +57,117 @@ First you must specify the access and secret keys via environment variables.
4857

4958
Then you can specify an S3 URI, with the following format:
5059

51-
``[HOST]/[BUCKET]/[PREFIX]``
60+
::
61+
62+
[HOST]/[BUCKET]/[PREFIX]
5263

5364
For example:
5465

55-
``./blobporter -f s3://mys3api.com/mybucket/mydata -c froms3 -t s3-blockblob``
66+
::
5667

57-
**Note:** For better performance, consider running this tranfer from a high-bandwidth VM running in the same region as source or the target. Data is uploaded as it is downloaded from the source, therefore the transfer is bound to the bandwidth of the VM for performance.
58-
Synchronously Copy data between Azure Blob Storage targets and sources
68+
./blobporter -f s3://mys3api.com/mybucket/mydata -c froms3 -t s3-blockblob
5969

70+
.. note::
6071

61-
Transfer Data Between Azure Storage Accounts, Containers and Blob Types
72+
BlobPorter will upload the data as it downloads it from the source.
73+
The performance of the transfer will be constraint by the bandwidth of the host running BlobPorter. Consider running this type of transfer from a Virtual Machine running in the same Azure region as the target or the source.
74+
75+
Transfer data between Azure Storage accounts, containers and blob types
6276
-----------------------------------------------------------------------
6377

6478
First, you must set the account key of the source storage account.
6579

66-
``export SOURCE_ACCOUNT_KEY=<YOUR KEY>``
80+
::
81+
82+
export SOURCE_ACCOUNT_KEY=<YOUR KEY>
83+
6784

6885
Then you can specify the URI of the source. The source could be a page, block or append blob. Prefixes are supported.
6986

70-
``./blobporter -f "https://mysourceaccount.blob.core.windows.net/container/myblob" -c mycontainer -t blob-blockblob``
87+
::
88+
89+
./blobporter -f "https://mysourceaccount.blob.core.windows.net/container/myblob" -c mycontainer -t blob-blockblob
7190

72-
**Note:** For better performance, consider running this tranfer from a high-bandwidth VM running in the same region as source or the target. Data is uploaded as it is downloaded from the source, therefore the transfer is bound to the bandwidth of the VM for performance.
73-
Synchronously Copy data between Azure Blob Storage targets and sources
91+
.. note::
7492

93+
BlobPorter will upload the data as it downloads it from the source.
94+
The performance of the transfer will be constraint by the bandwidth of the host running BlobPorter. Consider running this type of transfer from a Virtual Machine running in the same Azure region as the target or the source.
7595

7696
Transfer from an HTTP/HTTPS source to Azure Blob Storage
7797
--------------------------------------------------------
7898

7999
To block blob storage:
80100

81-
``./blobporter -f "http://mysource/file.bam" -c mycontainer -n file.bam -t http-blockblob``
101+
::
102+
103+
./blobporter -f "http://mysource/file.bam" -c mycontainer -n file.bam -t http-blockblob
82104

83105
To page blob storage:
84106

85-
``./blobporter -f "http://mysource/my.vhd" -c mycontainer -n my.vhd -t http-pageblob``
107+
::
108+
109+
./blobporter -f "http://mysource/my.vhd" -c mycontainer -n my.vhd -t http-pageblob
86110

87-
**Note:** For better performance, consider running this tranfer from a high-bandwidth VM running in the same region as source or the target. Data is uploaded as it is downloaded from the source, therefore the transfer is bound to the bandwidth of the VM for performance.
88-
Synchronously Copy data between Azure Blob Storage targets and sources
111+
.. note::
112+
113+
BlobPorter will upload the data as it downloads it from the source.
114+
The performance of the transfer will be constraint by the bandwidth of the host running BlobPorter. Consider running this type of transfer from a Virtual Machine running in the same Azure region as the target or the source.
89115

90116
Download from Azure Blob Storage
91-
--------------------------
117+
--------------------------------
92118

93119
For download scenarios, the source can be a page, append or block blob:
94120

95-
``./blobporter -c mycontainer -n file.bam -t blob-file``
121+
::
122+
123+
./blobporter -c mycontainer -n file.bam -t blob-file
96124

97125
You can use the -n option to specify a prefix. All blobs that match the prefix will be downloaded.
98126

99127
The following will download all blobs in the container that start with f:
100128

101-
``./blobporter -c mycontainer -n f -t blob-file``
129+
::
130+
131+
./blobporter -c mycontainer -n f -t blob-file
132+
102133

103134
Without the -n option all files in the container will be downloaded.
104135

105-
``./blobporter -c mycontainer -t blob-file``
136+
::
137+
138+
./blobporter -c mycontainer -t blob-file
139+
106140

107141
By default files are downloaded keeping the same directory structure as the remote source.
108142

109-
If you want download to the same directory where you are running blobporter, set -i option.
143+
If you want download to the same directory where you are running blobporter set -i option.
144+
145+
::
146+
147+
./blobporter -c mycontainer -t blob-file -i
148+
149+
150+
For scenarios where blob endpoint is from a soverign cloud (e.g. China and Germany), Azure Gov or Azure Stack, you can specify the fully qualified domain name:
151+
152+
::
153+
154+
./blobporter -f "https://[ACCOUNT_NAME].[BASE_URL]/[CONTAINER_NAME]/[PREFIX]" -t blob-file
155+
156+
And the source account key, must be set via an environment variable.
157+
158+
::
159+
160+
export SOURCE_ACCOUNT_KEY=<YOUR KEY>
161+
110162

111-
``./blobporter -p -c mycontainer -t blob-file -i``
112163

113164
Download a file from a HTTP source
114165
----------------------------------
115166

116-
``./blobporter -f "http://mysource/file.bam" -n /datadrive/file.bam -t http-file``
167+
::
168+
169+
./blobporter -f "http://mysource/file.bam" -n /datadrive/file.bam -t http-file
170+
171+
.. note::
117172

118-
**Note:** The ACCOUNT_NAME and ACCOUNT_KEY environment variables are not required in this scenario.
173+
The ACCOUNT_NAME and ACCOUNT_KEY environment variables are not required.

docs/gettingstarted.rst

Lines changed: 49 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Download, extract and set permissions
99

1010
::
1111

12-
wget -O bp_linux.tar.gz https://github.com/Azure/blobporter/releases/download/v0.6.09/bp_linux.tar.gz
12+
wget -O bp_linux.tar.gz https://github.com/Azure/blobporter/releases/download/v0.6.12/bp_linux.tar.gz
1313
tar -xvf bp_linux.tar.gz linux_amd64/blobporter
1414
chmod +x ~/linux_amd64/blobporter
1515
cd ~/linux_amd64
@@ -24,7 +24,7 @@ Set environment variables: ::
2424
Windows
2525
-------
2626

27-
Download `BlobPorter.exe <https://github.com/Azure/blobporter/releases/download/v0.6.10/bp_windows.zip>`_
27+
Download `BlobPorter.exe <https://github.com/Azure/blobporter/releases/download/v0.6.12/bp_windows.zip>`_
2828

2929
Set environment variables (if using the command prompt): ::
3030

@@ -36,3 +36,50 @@ Set environment variables (if using PowerShell): ::
3636
$env:ACCOUNT_NAME="<STORAGE_ACCOUNT_NAME>"
3737
$env:ACCOUNT_KEY="<STORAGE_ACCOUNT_KEY>"
3838

39+
40+
Command Options
41+
---------------
42+
43+
-f, --source_file (string) URL, Azure Blob or S3 Endpoint, file or files (e.g. /data/\*.gz) to upload.
44+
-c, --container_name (string) Container name (e.g. mycontainer).
45+
-n, --blob_name (string) Blob name (e.g. myblob.txt) or prefix for download scenarios.
46+
-g, --concurrent_workers (int) Number of go-routines for parallel upload.
47+
-r, --concurrent_readers (int) Number of go-routines for parallel reading of the input.
48+
-b, --block_size (string) Desired size of each blob block.
49+
50+
Can be specified as an integer byte count or integer suffixed with B, KB or MB.
51+
52+
-a, --account_name (string) Storage account name (e.g. mystorage).
53+
54+
Can also be specified via the ACCOUNT_NAME environment variable.
55+
56+
-k, --account_key (string) Storage account key string.
57+
58+
Can also be specified via the ACCOUNT_KEY environment variable.
59+
-s, --http_timeout (int) HTTP client timeout in seconds. Default value is 600s.
60+
-d, --dup_check_level (string) Desired level of effort to detect duplicate data blocks to minimize upload size.
61+
62+
Must be one of None, ZeroOnly, Full (default "None")
63+
-t, --transfer_type (string) Defines the source and target of the transfer.
64+
65+
Must be one of file-blockblob, file-pageblob, http-blockblob, http-pageblob, blob-file, pageblock-file (alias of blob-file), blockblob-file (alias of blob-file), http-file, blob-pageblob, blob-blockblob, s3-pageblob and s3-blockblob.
66+
-m, --compute_blockmd5 (bool) If set, block level MD5 has will be computed and included as a header when the block is sent to blob storage.
67+
68+
Default is false.
69+
-q, --quiet_mode (bool) If set, the progress indicator is not displayed.
70+
71+
The files to transfer, errors, warnings and transfer completion summary is still displayed.
72+
-x, --files_per_transfer (int) Number of files in a batch transfer. Default is 500.
73+
-h, --handles_per_file (int) Number of open handles for concurrent reads and writes per file. Default is 2.
74+
-i, --remove_directories (bool) If set blobs are downloaded or uploaded without keeping the directory structure of the source.
75+
76+
Not applicable when the source is a HTTP endpoint.
77+
-o, --read_token_exp (int) Expiration in minutes of the read-only access token that will be generated to read from S3 or Azure Blob sources.
78+
79+
Default value: 360.
80+
-l, --transfer_status (string) Transfer status file location.
81+
If set, blobporter will use this file to track the status of the transfer.
82+
83+
In case of failure and the same file is referrenced, the source files that were transferred will be skipped.
84+
85+
If the transfer is successful a summary will be appended.

docs/index.rst

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ BlobPorter
88

99
BlobPorter is a data transfer tool for Azure Blob Storage that maximizes throughput through concurrent reads and writes that can scale up and down independently.
1010

11+
::
12+
13+
1114
.. image :: bptransfer.png
1215
1316
.. toctree::
@@ -16,6 +19,7 @@ BlobPorter is a data transfer tool for Azure Blob Storage that maximizes through
1619

1720
gettingstarted
1821
examples
19-
performance/perfmode
20-
resumable_transfers
21-
options
22+
resumabletrans
23+
perfmode
24+
25+

0 commit comments

Comments
 (0)