Skip to content
Snippets Groups Projects
Commit 8483e15c authored by Milan's avatar Milan
Browse files

s3 versioning fix code

parent c79a50ab
No related merge requests found
...@@ -68,6 +68,7 @@ For non versioned bucket, if an object with the same key is uploaded it overwrit ...@@ -68,6 +68,7 @@ For non versioned bucket, if an object with the same key is uploaded it overwrit
???+ note "Bucket name restrictions" ???+ note "Bucket name restrictions"
The bucket name must be unique within tenant and should contain only uppercase and lowercase letters, numbers, and dashes and periods. The bucket name must only start with a letter or number and must not contain periods next to dashes or multiple periods. We also recommend **NOT using** `/` and `_` in the name, as this would make it impossible to use it via the API. The bucket name must be unique within tenant and should contain only uppercase and lowercase letters, numbers, and dashes and periods. The bucket name must only start with a letter or number and must not contain periods next to dashes or multiple periods. We also recommend **NOT using** `/` and `_` in the name, as this would make it impossible to use it via the API.
aws s3api create-bucket --bucket "bucket name" --profile "profil name" --endpoint-url=https://s3.cl2.du.cesnet.cz aws s3api create-bucket --bucket "bucket name" --profile "profil name" --endpoint-url=https://s3.cl2.du.cesnet.cz
aws s3api get-bucket-versioning --bucket "bucket name" --profile "profil name" --endpoint-url=https://s3.cl2.du.cesnet.cz aws s3api get-bucket-versioning --bucket "bucket name" --profile "profil name" --endpoint-url=https://s3.cl2.du.cesnet.cz
...@@ -83,18 +84,23 @@ For non versioned bucket, if an object with the same key is uploaded it overwrit ...@@ -83,18 +84,23 @@ For non versioned bucket, if an object with the same key is uploaded it overwrit
### Adding the object ### Adding the object
aws s3api put-object --key "file name" --body "file path 1" --bucket "bucket name" --profile "profil name" --endpoint-url=https://s3.cl2.du.cesnet.cz aws s3api put-object --key "file name" --body "file path 1" --bucket "bucket name" --profile "profil name" --endpoint-url=https://s3.cl2.du.cesnet.cz
{ {
"ETag": "\"5ec0f1a7fc3a60bf9360a738973f014d\"", "ETag": "\"5ec0f1a7fc3a60bf9360a738973f014d\"",
"VersionId": "KdS5Yl0d06bBSYriIddtVb0h5gofiNX" "VersionId": "KdS5Yl0d06bBSYriIddtVb0h5gofiNX"
} }
aws s3api put-object --key "file name" --body "file path 2" --bucket "bucket name" --profile "profil name" --endpoint-url=https://s3.cl2.du.cesnet.cz aws s3api put-object --key "file name" --body "file path 2" --bucket "bucket name" --profile "profil name" --endpoint-url=https://s3.cl2.du.cesnet.cz
{ {
"ETag": "\"5ec0f1a7fc3a60bf9360a738973f014d\"", "ETag": "\"5ec0f1a7fc3a60bf9360a738973f014d\"",
"VersionId": "xNQC4pIgMYx59digj5.gk15WC4efOOa" "VersionId": "xNQC4pIgMYx59digj5.gk15WC4efOOa"
} }
aws s3api list-object-versions --bucket "bucket name" --profile "profil name" --endpoint-url=https://s3.cl2.du.cesnet.cz aws s3api list-object-versions --bucket "bucket name" --profile "profil name" --endpoint-url=https://s3.cl2.du.cesnet.cz
{ {
"Versions": [ "Versions": [
{ {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment