OSSUTIL(1)
π NAME π
okay so bestie, meet ossutil β the Alibaba Cloud (Aliyun) Object Storage Service (OSS) CLI π and yes, this whole page is its manual, OSSUTIL(1). it's giving "your new favorite command-line bestie for everything OSS." periodt.
πΈ DESCRIPTION πΈ
Usage of ossutil:
Usage of ossutil:
that's literally the whole vibe of the description section, no notes π . everything juicy is down in OPTIONS, so let's go.
β¨ OPTIONS β¨
there are SO many of these and we're doing every single one, no skipping, no cap. buckle up π
--maxupspeed=β the max upload speed, and the unit isKB/s. the default value is0, which means unlimited (go feral, no throttle, slay) π¦--acr-method=β this sets the value of the http headerAccess-Control-Request-Method, and it's primarily used in thecors-optionscommand.--start-time=β the start time, as a timestamp in the Linux/Unix system. like, the number of seconds that have passed since January 1, 1970 (midnight UTC/GMT). the classic epoch vibe β--token-timeout=β how long a token stays valid for. unit iss, default value is3600, and it's primarily used for theAssumeRoleparameters inRamRoleArnmode.--ram-role-arn=β specifies the ARN of the ram role, primarily used inRamRoleArnmode.--read-timeout=β the time that the client read times out. unit iss, default value is1200.--bucketname=β specifies a name of bucket, primarily used in theprobecommand.--origin=β specifies the value of theoriginfield in the http header.--parallel=β how many concurrency tasks to run when working with a file. value range is1-10000, and by default ossutil will decide the value intelligently all on its own (she's smart, let her cook π).--downloadβ specifies a download action from oss, primarily used in theprobecommand.--kms-data-encryption=β specifies the kms data service encryption algorithm. currently it only supports the valueSM4or beingemtpy(their spelling, not mine, and yes we're keeping it exactly π).--proxy-user=β username of the network proxy, default is empty.--only-current-dirβ says that only files or objects in the current directory get manipulated, and subdirectories are ignored. no going deeper, we stay on this level π--connect-timeout=β the time that the client connection times out. unit iss, default value is120.--storage-class=β sets the storage class of the bucket (default:Standard). value range is:Standard/IA/Archive/ColdArchive.--include=β Include Pattern of key, e.g.*.jpgβ¨--exclude=β Exclude Pattern of key, e.g.*.txtπ«--acl=β acl information.--url=β specifies a url address, primarily used in theprobecommand.--mode=β specifies the authentication mode. the value can beAKοΌStsTokenοΌRamRoleArnοΌEcsRamRole, and the default value is empty.--part-size=β Part size, unit isByte. in default situation, ossutil will calculate the suitable part size according to file size. this option is useful when the user has special needs, or when the user needs to do performance tuning. the value range is:1-9223372036854775807(Byte).--probe-item=β specifies theprobecommand's probe item. the value can beupload-speed,download-speed,cycle-symlink.--backup-dir=β the directory of the backup file used by thesynccommand.-j,--jobs=β how many concurrency tasks run between multi-files (default:3). value range is:1-10000.--deleteβ delete.--disable-crc64β disables crc64. in default situation, ossutil turns crc64 check ON when transmitting data.--loglevel=β log level, default is empty (meaning no log file output). optional value is:info|debugβinfowill output information logs,debugwill output detail logs (including http request and response logs).-p,--passwordβ specifies that theaccessKeySecretis inputted from the keyboard β¨οΈ-k,--access-key-secret=β AccessKeySecret used while accessing oss. (Notice that the value of the option will cover the value in the config file.)--object=β specifies a name of object, primarily used in theprobecommand.--tagging=β Set object tagging, value format is["TagA=A&TagB=B...]"--output-dir=β this option specifies the directory to place the output file in. the output file contains: the report file generated by thecpcommand when an error happens during a batch copy operation (for more information about the report file, see help of thecpcommand). the default value of the option is:ossutil_outputdirectory in the current directory.-t,--sts-token=β STSToken used while accessing oss (Notice that the value of the option will cover the value in the config file). not necessary.-m,--multipartβ indicates that the subject of the command is uncompleted Multipart Uploads, instead of objects (which is the subject in the default situation).-r,--recursiveβ operate recursively. for those commands which support this option, when you use them and this option is specified, the command will operate on all matching objects under the bucket; else we will search the specified object and operate on that single object.--disable-empty-refererβ specifies that the referer field is not allowed to be empty, primarily used in thereferercommand.--version-id-marker=β specifies the marker of object version id when listing objects' all versions.--end-time=β the end time, as a timestamp in the Linux/Unix system. like, the number of seconds that have passed since January 1, 1970 (midnight UTC/GMT). β--role-session-name=β specifies the session name, primarily used inRamRoleArnmode.--encoding-type=β the encoding type of the object name or file name that the user inputs or outputs. currently ossutil only supports url encode, which means the value range of the option is:url. if you don't specify the option, it means the object name or file name that the user inputted or outputted was not encoded. bucket name does not support url encode. Note: if the option is specified, the cloud_url likeoss://bucket/objectshould be inputted asoss://bucket/url_encode(object), and the stringoss://bucket/should not be url encoded.-d,--directoryβ return matching subdirectory names instead of contents of the subdirectory.-u,--updateβ update.--snapshot-path=β okay this one is a whole saga, bestie, but it's important so we're doing it properly. π
this option is used to accelerate the incremental upload of batch files, or download of objects, in certain scenarios. if you use the option when uploading files or downloading objects, ossutil will generate files to record the snapshot information in the specified directory. the next time you upload files or download objects with the option, ossutil will read the snapshot information under the specified directory for incremental upload or incremental download.
the snapshot-path you specify must be a local file system directory that can be written in. if the directory does not exist, ossutil creates the files for recording snapshot information; else ossutil will read snapshot information from the path for incremental upload (ossutil will only upload the files which have not been successfully uploaded to oss, or which have been locally modified) or incremental download (ossutil will only download the objects which have not been successfully downloaded, or which have been modified), and update the snapshot information to the directory.
Note: the option records thelastModifiedTimeof local files which have been successfully uploaded in the local file system, or thelastModifiedTimeof objects which have been successfully downloaded, and compares thelastModifiedTimeof local files or objects in the nextcpto decide whether to skip the file or object.
if you use this option to achieve incremental upload, please make sure no other user modifies the corresponding object in oss during the two uploads. if you cannot guarantee those scenarios, please use the --update option to achieve incremental upload instead.
In addition, ossutil does not automatically deletesnapshot-pathsnapshot information. in order to avoid too much snapshot information piling up, when the snapshot information is useless, please clean up your ownsnapshot-pathon your own immediately. π§Ή
--uploadβ specifies an upload action to oss, primarily used in theprobecommand.--version-id=β specifies the object's version id.--disable-dir-objectβ specifies that an oss object is not generated for the directory itself when uploading, primarily used in thecpcommand.--redundancy-type=β specifies the bucket data redundancy type. the value can beLRS,ZRS.LRSis the default value and specifies locally redundant storage;ZRSspecifies higher availability of redundant storage.--bigfile-threshold=β the threshold of file size. a file size larger than the threshold will use resume upload or download (default:104857600). value range is:0-9223372036854775807.--trafic-limit=β http request speed limit, unit isbit/s, default value is0(unlimited), primarily used in thesigncommand. (yes it's spelledtrafic, we don't fix, we respect π«Ά)--local-host=β ossutil's ip, such as127.0.0.1.--sts-region=β specifies the region of the sts endpoint, such ascn-shenzhenβ in this case,cnrefers to the country andshenzhenrefers to the region β used to construct the sts endpoint. when this option defaults, the sts endpoint issts.aliyuncs.com. primarily used inRamRoleArnmode.-v,--versionβ Show ossutil version (v1.7.9) and exit. bye bestie π-s,--short-formatβ Show by short format. if the option is not specified, it shows long format by default.--maxdownspeed=β max download speed, unit isKB/s, default value is0(unlimited) π--acr-headers=β specifies the value of the http headerAccess-Control-Request-Headers, primarily used in thecors-optionscommand.--enable-symlink-dirβ specifies uploading link subdirectories. by default they are not uploaded. theprobecommand can detect whether there is a dead cycle symlink file or directory. π¦--disable-encode-slashβ specifies no encoding of/in the url path section, primarily used in thesigncommand.--disable-all-symlinkβ specifies that uploading of symlink files and symlink directories under the directory is not allowed. the default value isfalse.-B,--block-size=β specifies the unit of byte display for theducommand. the value can beKB,MB,GB,TB.--ua=β Specify the user agent in the http request, and the specified value will be added after the default value.--upload-id-marker=β the marker of object when listing object or Multipart Uploads.
okay that's part 1, and there's more coming so don't go anywhere ππΈβ¨
okay bestie the flag buffet is STILL going, grab a snack, we're finishing this π
-b,--bucketβ the option that makes absolutely sure the operation is operating on a bucket. like, no confusion, it's a bucket, periodt πͺ£-f,--forceβ do the thing silently, no asking the user to confirm first. no "are you sure?" pop-up, it just GOES. use responsibly bestie π--upmode=β sets the upload mode. default isnormal, and the optional values arenormal|append|multipart, which mean normal upload, append upload, and multipart upload respectively. it's mostly used in theprobecommand. lowkey a whole personality selector β¨--kms-masterkey-id=β specifies the primary key id inside the kms (key management service). your keys, your kingdom π--skip-verify-certβ says the oss server's digital certificate file will not be verified. it's giving "we trust you, no questions asked" π«£--timeout=β the time out ofsignurl, unit is seconds, default value is60, and the value range is0-9223372036854775807. yes that's a huge number, no we're not questioning it π--type=β the hash type. Default:crc64, value range iscrc64/md5--method=β specifies the command's operation type. the values arePUT,GET,DELETE,LIST, etc. pick your fighter βοΈ--partition-download=β this one is for partition download mode: one command downloads one partition. the value format is"partition number:total count of partitions", such as1:5, which means the command downloads partition 1 and the total partition count is 5. the partition number is numbered from1, and the partitioning rules for objects are determined byossutil. with this option, the objects to be downloaded get split into multiple partitions, which can be downloaded by multipleossutilcommands β eachossutilcommand downloads its own partition, and multipleossutilcommands can be run on different machines in parallel. it's giving teamwork, it's giving girlboss distribution π--proxy-pwd=β password of the network proxy, default is empty--limited-num=β the limited number of return results. a little portion control π--checkpoint-dir=β Path of the checkpoint directory (default:.ossutil_checkpoint). this directory is used in resume upload or download. when an operation fails,ossutilcreates the directory automatically and records the checkpoint information inside it; when the operation succeeds, the directory gets removed. so when you specify this option, please make sure the directory can be removed.
β οΈ bestie READ THAT AGAIN: if you point this at a directory you actually care about, it will get deleted on success. do not send your homework folder in there π
--meta=β set object meta as[header:value#header:value...], e.g.,Cache-Control:no-cache#Content-Encoding:gzip-L,--language=β set the language ofossutil(default:EN), value range isCH/EN. if you set it to"CH", please make sure your system language isUTF-8. multilingual icon behavior π--marker=β the marker of the bucket when listing buckets, or the marker of the key when listing objects or Multipart Uploads, or anywhere else a marker is needed. a little bookmark for your soul π--range=β the range when downloading objects, the form is like:3-9or3-or-9--sse-algorithm=β specifies the server side encryption algorithm, value isKMSorAES256. encryption but make it fashion π-e,--endpoint=β base endpoint for the oss endpoint. (Notice that the value of the option will cover the value in the config file.) Take notice that it should be second-level domain (SLD).--retry-times=β retry times when it fails (default:10), value range is1-500. never give up, never surrender, but also there's a cap π-c,--config-file=β Path of theossutilconfiguration file β where to dump config in theconfigcommand, or where to load config from in other commands that need credentials.--payer=β the payer of the request. you can set this value to"requester"if you want to pay for requester. split the bill energy, but for cloud storage π§Ύ--addr=β specifies a network address, usually a domain, primarily used in theprobecommand--all-versionsβ specifies the object's all versions. every era of that object, we love a throwback π¦--proxy-host=β url of the network proxy server, which supportshttp/https/socks5, such ashttps://120.79.128.211:3128,socks5://120.79.128.211:1080--disable-ignore-errorβ specifies that errors are not ignored during batchcp. default value isfalse. flip it and every little error will be seen and felt π--ecs-role-name=β specifies the authentication mode, primarily used inEcsRamRolemode.--item=β specifies the command's function type. the values areLOCATION,PROGRESS, etc. it's giving structured output, it's giving options π-i,--access-key-id=β AccessKeyID while accessing oss. (Notice that the value of the option will cover the value in the config file.) keep it secret, keep it safe bestie π-a,--all-typeβ indicate that the subject of the command contains both objects and uncompleted Multipart Uploads. all of it, the whole collection, no crumbs left β¨-h,--helpβ show usage message. when in doubt,-hit out π«Ά--versionβ show version
and that's the whole list, bestie, you ate that π this little page is from ossutil 1.7.9, dated August 2025, and you can find it filed under OSSUTIL(1) β go forth and be iconic with your buckets πβ¨π
π¦ where this page comes from
- fedora 43: golang-github-aliyun-ossutil 1.7.9-14.fc43 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms