Uploads files to Blob storage & optionally deletes uploaded files
860
Powershell script that uploads files to Blob storage & optionally deletes uploaded files
| Variable name | Example value | Description |
|---|---|---|
| SKIP_DIRECTORIES | *something*;anotherSomething*;/data/somesubfolder | Folders which you want to skip uploading. Wildcards are permitted. This is an optional parameter. |
| UPLOAD_CRON_EXPRESSION | */2 * * * * | The CRON expression in which frequency to run the script. |
| STORAGE_ACCOUNT_NAME | mystorageaccount | The Azure StorageAccountname. |
| STORAGE_ACCOUNT_KEY | mOIUoumoimUOImuoyb9696d93q8m9+asd+1f== | This accesskey can be found in your storage account under "Access keys". |
| BLOB_CONTAINER_NAME | mydata | The Blob container name to use. |
| BLOB_TIER | Archive | The blob tier to use. Options are Hot, Cool, Archive. |
| GRACE_PERIOD_IN_SECONDS | 3600 | Files newer than this grace period will be skipped (both for uploading & deleting). This is usefull for when files are still in use when the upload starts. |
| DELETE_ON_SUCCESSFUL_UPLOAD | 1 | Deletes the local file after upload if 1 (Choose either 1 (true) or 0 (false)). |
docker run --name=myuploader -e UPLOAD_CRON_EXPRESSION='*/2 * * * *' -e STORAGE_ACCOUNT_NAME="mystorageaccount" -e STORAGE_ACCOUNT_KEY="mOIUoumoimUOImuoyb9696d93q8m9+asd+1f==" -e BLOB_CONTAINER_NAME="mydata" -e BLOB_TIER="Archive" -e GRACE_PERIOD_IN_SECONDS=3600 -e DELETE_ON_SUCCESSFUL_UPLOAD=1 -v /some/data/path/on/host:/data -d robhofmann/powershellazurecronblobuploader
Content type
Image
Digest
Size
167.4 MB
Last updated
about 5 years ago
docker pull robhofmann/powershellazurecronblobuploader