Skip to content

Commit 14ebad4

Browse files
authored
Merge pull request #75 from Azure/dev
version 0.5.22
2 parents 27008bf + 317cc41 commit 14ebad4

File tree

150 files changed

+57037
-545
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

150 files changed

+57037
-545
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ _obj
88
_test
99
_build/linux_amd64
1010
_build/windows_amd64
11+
_wd
1112
.vscode
1213

1314
# Architecture specific extensions/prefixes

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
sudo: required
22
language: go
33
go:
4-
- 1.8
4+
- 1.9
55
before_install:
66
- sudo apt-get install zip
77
- go get github.com/tools/godep

Godeps/Godeps.json

Lines changed: 69 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

LICENSE

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,11 @@ Unless required by applicable law or agreed to in writing, software distributed
3131
See the License for specific language governing permissions and limitations under the License.
3232
--------------------------------------------------------End of License---------------------------------------------------------------------------------------
3333

34+
Minio Client SDK for Go
35+
Licensed under the Apache License, Version 2.0 (the "License");
36+
you may not use this file except in compliance with the License. You may obtain a copy of the License at
37+
http://www.apache.org/licenses/LICENSE-2.0
38+
Unless required by applicable law or agreed to in writing, software
39+
distributed under the License is distributed on an "AS IS" BASIS,
40+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
41+
See the License for the specific language governing permissions and limitations under the License.

README.md

Lines changed: 44 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@ Sources and targets are decoupled, this design enables the composition of variou
1515
| --------------- | -----------------| -----------------|-----------------|
1616
| File (Upload) | Yes | Yes | NA |
1717
| HTTP/HTTPS* | Yes | Yes | Yes |
18-
| Azure Block Blob | Yes** | Yes** | Yes |
19-
| Azure Page Blob | Yes** | Yes** | Yes |
18+
| Azure Block Blob | Yes | Yes | Yes |
19+
| Azure Page Blob | Yes | Yes | Yes |
20+
| S3 Endpoint | Yes | Yes | No |
2021

2122
*\* The HTTP/HTTPS source must support HTTP byte ranges and return the file size as a response to a HTTP HEAD request.*
2223

23-
*\*\* Using the Blob URL with a valid SAS Token with read access .*
2424

2525
## Getting Started
2626

@@ -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.5.14/bp_linux.tar.gz
32+
wget -O bp_linux.tar.gz https://github.com/Azure/blobporter/releases/download/v0.5.22/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.5.14/bp_windows.zip)
49+
Download [BlobPorter.exe](https://github.com/Azure/blobporter/releases/download/v0.5.22/bp_windows.zip)
5050

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

@@ -94,6 +94,41 @@ For example, a single file upload to page blob:
9494

9595
>Note: The file size and block size must be a multiple of 512 (bytes). The maximum block size is 4MB.
9696
97+
### Upload from an S3 compatible endpoint to Azure Blob Storage
98+
99+
You can upload data directly from an S3 compatible endpoint. First you must specify the access and secret keys via environment variables.
100+
101+
```bash
102+
export S3_ACCESS_KEY=<YOUR ACCESS KEY>
103+
export S3_SECRET_KEY=<YOUR_SECRET_KEY>
104+
```
105+
106+
Then you can specify an S3 URI, with the following format:
107+
108+
[URL]/[BUCKET][PREFIX]
109+
110+
For example:
111+
112+
`./blobporter -f s3://s3.amazonaws.com/bpperftest/mydata -c froms3 -t s3-blockblob -p`
113+
114+
>Note: For better performance, consider running this tranfer from a 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.
115+
116+
### Synchronously Copy data between Azure Blob Storage targets and sources
117+
118+
You can synchronously transfer data between Azure Storage accounts, containers and blob types.
119+
120+
First, you must set the account key of the source storage account.
121+
122+
```bash
123+
export SOURCE_ACCOUNT_KEY=<YOUR KEY>
124+
```
125+
126+
Then you can specify the URI of the source. Prefixes are supported.
127+
128+
`./blobporter -f "https://mysourceaccount.blob.core.windows.net/container/myblob" -c mycontainer -t blob-blockblob`
129+
130+
>Note: For better performance, consider running this tranfer from a 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.
131+
97132
### Upload from an HTTP/HTTPS source to Azure Blob Storage
98133

99134
To block blob storage:
@@ -104,13 +139,7 @@ To page blob storage:
104139

105140
`./blobporter -f "http://mysource/my.vhd" -c mycontainer -n my.vhd -t http-pageblob`
106141

107-
You can use this approach to transfer data between Azure Storage accounts and blob types - e.g. transfer a blob from one account to another or from a page blob to block blob.
108-
109-
The source is a page blob with a SAS token and the target is block blob:
110-
111-
`./blobporter -f "https://myaccount.blob.core.windows.net/vhds/my.vhd?st=2015-03-23T03%3A59%3A00Z&se=2015-03-24T03%3A59%3A00Z&sp=rl&sv=2015-12-11&sr=b&sig=123rfdAsYyqOxxOGe28%3Fp4H6r5reR8pdSBdlchi64wgs3D" -c mycontainer -n my.vhd -t http-blockblob`
112-
113-
>Note: In HTTP/HTTPS to blob transfers, data is downloaded and uploaded as it is received without disk IO.
142+
>Note: For better performance, consider running this tranfer from a 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.
114143
115144
### Download from Azure Blob Storage
116145

@@ -139,7 +168,7 @@ By default files are downloaded to the same directory where you are running blob
139168
140169
## Command Options
141170

142-
- `-f`, `--source_file` *string* URL, file or files (e.g. /data/*.gz) to upload.
171+
- `-f`, `--source_file` *string* URL, Azure Blob or S3 Endpoint, file or files (e.g. /data/*.gz) to upload.
143172

144173
- `-c`, `--container_name` *string* container name (e.g. `mycontainer`).
145174

@@ -167,7 +196,7 @@ By default files are downloaded to the same directory where you are running blob
167196

168197
- `-d`, `--dup_check_level` *string* desired level of effort to detect duplicate data blocks to minimize upload size. Must be one of None, ZeroOnly, Full (default "None")
169198

170-
- `-t`, `--transfer_type` *string* defines the source and target of the transfer. 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) or http-file
199+
- `-t`, `--transfer_type` *string* defines the source and target of the transfer. 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.
171200

172201
- `m`, `--compute_blockmd5` *bool* if present or true, block level MD5 has will be computed and included as a header when the block is sent to blob storage. Default is false.
173202

@@ -189,7 +218,7 @@ By default, BlobPorter creates 5 readers and 8 workers for each core on the comp
189218

190219
- For transfers from fast disks (SSD) or HTTP sources reducing the number readers or workers could provide better performance than the default values. Reduce these values if you want to minimize resource utilization. Lowering these numbers reduces contention and the likelihood of experiencing throttling conditions.
191220

192-
- Transfers can be batched. Each batch transfer will concurrently read and transfer up to 200 files (default value) from the source. The batch size can be modified using the -x option, the maximum value is 500.
221+
- Transfers can be batched. Each batch transfer will concurrently read and transfer up to 500 files (default value) from the source. The batch size can be modified using the -x option.
193222

194223
- Blobs smaller than the block size are transferred in a single operation. With relatively small files (<32MB) performance may be better if you set a block size equal to the size of the files. Setting the number of workers and readers to the number of files could yield performance gains.
195224

0 commit comments

Comments
 (0)