I'm having a bit of an issue when it comes to Amazon Glacier.
I typed in the command
aws glacier initiate-multipart-upload \
--account-id - \
--archive-description "Qozu Chronicles May 2023 Backup" \
--part-size 4294967296 \
--vault-name tyllavideo
and got the following result:
{
"location": "/953374234641/vaults/tyllavideo/multipart-uploads/-BbO80kesvItrSPcGdZrfhco87xzs1oPdWG4r1WW7lJ1aTjElIICKthnMnkFuFjej8k4kWvJvaOQFNXGufCfYNKKSuiW",
"uploadId": "-BbO80kesvItrSPcGdZrfhco87xzs1oPdWG4r1WW7lJ1aTjElIICKthnMnkFuFjej8k4kWvJvaOQFNXGufCfYNKKSuiW"
}
Note that the uploadId
starts with a -
. This becomes a problem when I want to upload a part, as when I run the command
aws glacier upload-multipart-part \
--upload-id -BbO80kesvItrSPcGdZrfhco87xzs1oPdWG4r1WW7lJ1aTjElIICKthnMnkFuFjej8k4kWvJvaOQFNXGufCfYNKKSuiW \
--body chunkaa \
--range 'bytes 0-6717640/*' \
--account-id - \
--vault-name tyllavideo
I get this error:
aws: error: argument --upload-id: expected one argument
I tried enclosing the uploadId
in quotes, and I tried using a \
to escape the -
. Both gave the same error. What am I doing wrong, and how do I get the upload started?
--range
is handled? Not sure what you are using aws cli in, but you can store the uploadId as a variable and then pass it in. In powershell -$uploadId="-Bb08...."
thenaws glacier..... --upload-id $uploadId
An error occurred (ResourceNotFoundException) when calling the UploadMultipartPart operation: The upload ID was not found: <-BbO80kesvItrSPcGdZrfhco87xzs1oPdWG4r1WW7lJ1aTjElIICKthnMnkFuFjej8k4kWvJvaOQFNXGufCfYNKKSuiW>
<
and>
are meant to be literal. Or did you try--upload-id='-Bb…'
?