diff --git a/Readme.md b/Readme.md index 45679a8..e7b3828 100644 --- a/Readme.md +++ b/Readme.md @@ -8,76 +8,75 @@ | Based On | https://github.com/CoreHelpers/AzureStorageTable | # Execute Table Backup with the pre-compiled container +The engine is manifest based so build a new manifest with the following structure and launch the docker container. +Multiple backups can be defined in one manifest file. -``` -docker run \ --e SRC_ACCOUNT_NAME={{YOUR ACCOUNT NAME}} \ --e SRC_ACCOUNT_KEY={{YOUR ACCOUNT KEY}} \ --e TGT_ACCOUNT_NAME={{YOUR ACCOUNT KEY}} \ --e TGT_ACCOUNT_KEY={{YOUR ACCOUNT KEY}} \ --e TGT_ACCOUNT_CONTAINER={{YOUR ACCOUNT CONTAINER}} \ -corehelpers/azurebackup +```json +{ + "Id": "<>", + "Items": [ + { + "Id": "<>", + "Name": "<>", + "Enabled": true, + + "Operation": "backup", + "StorageType": "table", + + "TargetConnectionString": "<>", + "TargetContainer": "<>", + + "SourceConnectionString": "<>", + + "Excludes": [ + "<>" + ], + + "FinishedHook": "<>" + } + ] +} ``` -# Execute Table Restore with the pre-compiled container +The docker container can be launched as follows: ``` docker run \ --e MODE=Restore \ --e SRC_ACCOUNT_NAME={{YOUR ACCOUNT NAME}} \ --e SRC_ACCOUNT_KEY={{YOUR ACCOUNT KEY}} \ --e SRC_ACCOUNT_CONTAINER={{YOUR ACCOUNT CONTAINER}} \ --e SRC_BACKUP_ID={{YOUR BACKUP ID}} \ --e TGT_ACCOUNT_NAME={{YOUR ACCOUNT NAME}} \ --e TGT_ACCOUNT_KEY={{YOUE ACCOUNT KEY}} \ -corehelpers/azurebackup -``` -# Execute Blob Backup with the pre-compiled container +-e MANIFEST={{FILE or URL to the manifest}} +corehelpers/azurebackup:<> ``` -docker run \ --e STORAGE_TYPE=Blob \ --e SRC_ACCOUNT_NAME={{YOUR ACCOUNT NAME}} \ --e SRC_ACCOUNT_KEY={{YOUR ACCOUNT KEY}} \ --e TGT_ACCOUNT_NAME={{YOUR ACCOUNT KEY}} \ --e TGT_ACCOUNT_KEY={{YOUR ACCOUNT KEY}} \ --e TGT_ACCOUNT_CONTAINER={{YOUR ACCOUNT CONTAINER}} \ -corehelpers/azurebackup + +# Execute Table Restore with the pre-compiled container +The engine is manifest based so build a new manifest with the following structure and launch the docker container. +Multiple backups can be defined in one manifest file. + +```json +{ + "Id": "<>", + "Items": [ + { + "Id": "<>", + "Name": "<>", + "Enabled": true, + + "Operation": "restore", + "StorageType": "table", + + "SourceConnectionString": "<>", + "SourceContainer": "<>", + + "TargetConnectionString": "<>", + } + ] +} ``` -# Execute Blob Restore with the pre-compiled container +The docker container can be launched as follows: ``` docker run \ --e MODE=Restore \ --e STORAGE_TYPE=Blob \ --e SRC_ACCOUNT_NAME={{YOUR ACCOUNT NAME}} \ --e SRC_ACCOUNT_KEY={{YOUR ACCOUNT KEY}} \ --e SRC_ACCOUNT_CONTAINER={{YOUR ACCOUNT CONTAINER}} \ --e SRC_BACKUP_ID={{YOUR BACKUP ID}} \ --e TGT_ACCOUNT_NAME={{YOUR ACCOUNT NAME}} \ --e TGT_ACCOUNT_KEY={{YOUE ACCOUNT KEY}} \ -corehelpers/azurebackup +-e MANIFEST={{FILE or URL to the manifest}} +corehelpers/azurebackup:<> ``` -# Available Variables - -| Variable | Mandatory | Default | Description | -|---|---|---|---| -| MODE | No | Backup | Defines if the container runs in backup or restore mode | -| STORAGE_TYPE | No | Table | Defines if the backup runs for blobs or tables | -| COMPRESS | No | True | Defines if the blob data will be compressed before uploading again (table data will always be compressed). If False, server side copy is used. | -| TRD_COUNT | No | 10 | ParallelOperationThreadCount: Gets or sets the number of blocks that may be simultaneously uploaded (blobs only).| -| UPL_THRESHOLD | No | 32 MiB | SingleBlobUploadThresholdInBytes: Gets or sets the maximum size of a blob in bytes that may be uploaded as a single blob. Ignored if TRD_COUNT greater than 1 (blobs only).| -| SRC_ACCOUNT_NAME | Yes | n/a | Defines the account where the system should backup or restore from | -| SRC_ACCOUNT_KEY | Yes | n/a | Defines the storage account key | -| SRC_ACCOUNT_CONTAINER | Yes when restore | n/a | Defines the container name the restore should load from | -| SRC_BACKUP_ID | Yes when restore | n/a | Defines the backup id which is the file prefix generated during backup which is used for restore | -| SRC_ACCOUNT_ENDPOINT_SUFFIX | No | empty | Allows to send endpoint suffixes for special Azure regions | -| SRC_EXCLUDE_TABLES | No | empty | Allows to define tables which are excluded from backup | -| SRC_EXCLUDE_BLOB_CONTAINER | No | empty | Allows to define blob containers which are excluded from backup | -| TGT_ACCOUNT_NAME | Yes | n/a | Defines the account where the system should backup or restore to | -| TGT_ACCOUNT_KEY | Yes | n/a | Defines the storage account key | -| TGT_ACCOUNT_CONTAINER | Yes when backup | n/a | Defines the container name the backup should store to | -| TGT_ACCOUNT_ENDPOINT_SUFFIX | No | empty | Allows to send endpoint suffixes for special Azure regiosn | - # Build the backup container manually Step 1: publish the runner into a dedicated directory