HCP Object Management

s5cmd

1
2
3
4
5
6
7
8
export AWS_ACCESS_KEY_ID=Y2NtdXNlcg==
export AWS_SECRET_ACCESS_KEY=47a56a2a894cf0f3c17d42ab4d9fa502
export S3_ENDPOINT_URL=https://xxx.object.yyy.zzz

./s5cmd ls --show-fullpath s3://rd-info/0003/*
./s5cmd head s3://rd-info/data/0002/0d/55660cbc-da9a-4c29-8dba-4b719ea70e50 | jq .
./s5cmd rm s3://rd-info/0003/*
./s5cmd du --humanize --group s3://intf-file/*

./s5cmd run command.txt
command.txt

1
2
3
rm s3://rd-info/data/1*
rm s3://rd-info/data/2*
rm s3://rd-info/data/3*

s3cmd

.s3cfg

1
2
3
4
5
access_key = Y2NtdXNlcg==
host_base = xxx.object.yyy.zzz
host_bucket = %(bucket)s.xxx.object.yyy.zzz
secret_key = 47a56a2a894cf0f3c17d42ab4d9fa502
website_endpoint = https://xxx.object.yyy.zzz:8000
1
2
3
4
5
6
./s3cmd ls s3://rd-info/0006 --no-check-hostname --recursive
./s3cmd rm s3://rd-info/0006 --no-check-hostname --recursive
./s3cmd del s3://rd-info/data/0000/61/36bd4f8d-a5a7-40a3-b45f-da999ceecd97 --add-header="x-amz-bypass-governance-retention:true" --no-check-hostname
./s3cmd setobjectretention GOVERNANCE 2026-04-17T23:59:59Z s3://rd-info/data/0000/61/36bd4f8d-a5a7-40a3-b45f-da999ceecd97 --no-check-hostname

nohup ./s3cmd rm s3://rd-info-bak/data/ --no-check-hostname --recursive --force > output.log 2>&1 &

aws s3 / s3api

1
2
3
4
5
6
7
aws s3 ls --endpoint-url https://xxx.object.yyy.zzz s3://rd-info/data/0000/ --no-verify-ssl --recursive --summarize

aws s3api put-object-retention --endpoint-url https://xxx.object.yyy.zzz --bucket rd-info --key data/0000/61/36bd4f8d-a5a7-40a3-b45f-da999ceecd97 --retention '{ "Mode": "GOVERNANCE", "RetainUntilDate": "2026-04-17T18:20:35" }' --no-verify-ssl --bypass-governance-retention

aws s3api delete-object --endpoint-url https://xxx.object.yyy.zzz --bucket rd-info --key data/0000/61/36bd4f8d-a5a7-40a3-b45f-da999ceecd97 --no-verify-ssl

aws s3api head-object --endpoint-url https://xxx.object.yyy.zzz --bucket rd-info --key data/0000/61/36bd4f8d-a5a7-40a3-b45f-da999ceecd97 --no-verify-ssl