diff --git a/docs/obs/tool-obsutil/ALL_META.TXT.json b/docs/obs/tool-obsutil/ALL_META.TXT.json new file mode 100644 index 000000000..be1688fc5 --- /dev/null +++ b/docs/obs/tool-obsutil/ALL_META.TXT.json @@ -0,0 +1,1410 @@ +[ + { + "dockw":"OBS Client Guide (obsutil)" + }, + { + "uri":"obs_11_0001.html", + "node_id":"obs_11_0001.xml", + "product_code":"obs", + "code":"1", + "des":"obsutil is a command line tool for accessing and managing OBS. You can use this tool to create buckets and upload, download, or delete files/folders. If you are familiar ", + "doc_type":"utiltg", + "kw":"obsutil Introduction,OBS Client Guide (obsutil)", + "search_title":"", + "metedata":[ + { + "prodname":"obs", + "documenttype":"utiltg" + } + ], + "title":"obsutil Introduction", + "githuburl":"" + }, + { + "uri":"obs_11_0003.html", + "node_id":"obs_11_0003.xml", + "product_code":"obs", + "code":"2", + "des":"Table 1 lists the download links of obsutil for different OSs.Download links of obsutilOSSoftware PackageManual Verification Signature FileAutomatic Verification Signatur", + "doc_type":"utiltg", + "kw":"obsutil,OBS,Downloading and Installing obsutil,OBS Client Guide (obsutil)", + "search_title":"", + "metedata":[ + { + "prodname":"obs", + "documenttype":"utiltg" + } + ], + "title":"Downloading and Installing obsutil", + "githuburl":"" + }, + { + "uri":"obs_11_0002.html", + "node_id":"obs_11_0002.xml", + "product_code":"obs", + "code":"3", + "des":"HUAWEI CLOUD Help Center presents technical documents to help you quickly get started with HUAWEI CLOUD services. The technical documents include Service Overview, Price Details, Purchase Guide, User Guide, API Reference, Best Practices, FAQs, and Videos.", + "doc_type":"utiltg", + "kw":"Getting Started", + "search_title":"", + "metedata":[ + { + "prodname":"obs", + "documenttype":"utiltg" + } + ], + "title":"Getting Started", + "githuburl":"" + }, + { + "uri":"obs_11_0061.html", + "node_id":"obs_11_0061.xml", + "product_code":"obs", + "code":"4", + "des":"When you call APIs, you need to use the AK and SK for authentication. To obtain the AK and SK, perform the following steps:This step is required only when you have enable", + "doc_type":"utiltg", + "kw":"Creating Access Keys (AK and SK),Getting Started,OBS Client Guide (obsutil)", + "search_title":"", + "metedata":[ + { + "prodname":"obs", + "documenttype":"utiltg", + "opensource":"true" + } + ], + "title":"Creating Access Keys (AK and SK)", + "githuburl":"" + }, + { + "uri":"obs_11_0005.html", + "node_id":"obs_11_0005.xml", + "product_code":"obs", + "code":"5", + "des":"Before using obsutil, you need to configure the OBS endpoint and AK/SK for obsutil to interconnect with OBS. Then, you can use obsutil to operate OBS buckets and objects.", + "doc_type":"utiltg", + "kw":"AK,SK,access keys,AK/SK setting,Initializing the Configuration,Getting Started,OBS Client Guide (obs", + "search_title":"", + "metedata":[ + { + "prodname":"obs", + "documenttype":"utiltg" + } + ], + "title":"Initializing the Configuration", + "githuburl":"" + }, + { + "uri":"obs_11_0006.html", + "node_id":"obs_11_0006.xml", + "product_code":"obs", + "code":"6", + "des":"This section uses the Linux OS as an example to describe how to use obsutil to perform basic operations in OBS. For details, see .You have obtained obsutil and completed ", + "doc_type":"utiltg", + "kw":"Quick Start,Getting Started,OBS Client Guide (obsutil)", + "search_title":"", + "metedata":[ + { + "prodname":"obs", + "documenttype":"utiltg" + } + ], + "title":"Quick Start", + "githuburl":"" + }, + { + "uri":"obs_11_0007.html", + "node_id":"obs_11_0007.xml", + "product_code":"obs", + "code":"7", + "des":"HUAWEI CLOUD Help Center presents technical documents to help you quickly get started with HUAWEI CLOUD services. The technical documents include Service Overview, Price Details, Purchase Guide, User Guide, API Reference, Best Practices, FAQs, and Videos.", + "doc_type":"utiltg", + "kw":"Bucket Commands", + "search_title":"", + "metedata":[ + { + "prodname":"obs", + "documenttype":"utiltg" + } + ], + "title":"Bucket Commands", + "githuburl":"" + }, + { + "uri":"obs_11_0008.html", + "node_id":"obs_11_0008.xml", + "product_code":"obs", + "code":"8", + "des":"You can use this command to create a bucket. A bucket name must be unique in OBS. One account can create a maximum of 100 buckets.If you create a bucket and name it the s", + "doc_type":"utiltg", + "kw":"Creating a Bucket,Bucket Commands,OBS Client Guide (obsutil)", + "search_title":"", + "metedata":[ + { + "prodname":"obs", + "documenttype":"utiltg" + } + ], + "title":"Creating a Bucket", + "githuburl":"" + }, + { + "uri":"obs_11_0009.html", + "node_id":"obs_11_0009.xml", + "product_code":"obs", + "code":"9", + "des":"You can use this command to obtain the bucket list. In the list, bucket names are displayed in lexicographical order.In Windowsobsutil ls [-s] [-sc] [-du] [-fs] [-j=1] [", + "doc_type":"utiltg", + "kw":"Listing Buckets,Bucket Commands,OBS Client Guide (obsutil)", + "search_title":"", + "metedata":[ + { + "prodname":"obs", + "documenttype":"utiltg" + } + ], + "title":"Listing Buckets", + "githuburl":"" + }, + { + "uri":"obs_11_0010.html", + "node_id":"obs_11_0010.xml", + "product_code":"obs", + "code":"10", + "des":"You can use this command to query the basic properties of a bucket, including its default storage class, region, version ID, storage usage, bucket quota, whether it suppo", + "doc_type":"utiltg", + "kw":"Querying Bucket Properties,Bucket Commands,OBS Client Guide (obsutil)", + "search_title":"", + "metedata":[ + { + "prodname":"obs", + "documenttype":"utiltg" + } + ], + "title":"Querying Bucket Properties", + "githuburl":"" + }, + { + "uri":"obs_11_0040.html", + "node_id":"obs_11_0040.xml", + "product_code":"obs", + "code":"11", + "des":"You can use this command to set the properties of a bucket, such as storage classes and access policies.In Windowsobsutil chattri obs://bucket [-sc=xxx] [-acl=xxx] [-aclX", + "doc_type":"utiltg", + "kw":"Setting Bucket Properties,Bucket Commands,OBS Client Guide (obsutil)", + "search_title":"", + "metedata":[ + { + "prodname":"obs", + "documenttype":"utiltg" + } + ], + "title":"Setting Bucket Properties", + "githuburl":"" + }, + { + "uri":"obs_11_0011.html", + "node_id":"obs_11_0011.xml", + "product_code":"obs", + "code":"12", + "des":"You can use this command to delete a bucket. The bucket to be deleted must be empty (containing no objects, historical versions, or fragments).To delete a non-empty bucke", + "doc_type":"utiltg", + "kw":"Deleting a Bucket,Bucket Commands,OBS Client Guide (obsutil)", + "search_title":"", + "metedata":[ + { + "prodname":"obs", + "documenttype":"utiltg" + } + ], + "title":"Deleting a Bucket", + "githuburl":"" + }, + { + "uri":"obs_11_0012.html", + "node_id":"obs_11_0012.xml", + "product_code":"obs", + "code":"13", + "des":"HUAWEI CLOUD Help Center presents technical documents to help you quickly get started with HUAWEI CLOUD services. The technical documents include Service Overview, Price Details, Purchase Guide, User Guide, API Reference, Best Practices, FAQs, and Videos.", + "doc_type":"utiltg", + "kw":"Object Commands", + "search_title":"", + "metedata":[ + { + "prodname":"obs", + "documenttype":"utiltg" + } + ], + "title":"Object Commands", + "githuburl":"" + }, + { + "uri":"obs_11_0050.html", + "node_id":"obs_11_0050.xml", + "product_code":"obs", + "code":"14", + "des":"You can use this command to create a folder in a specified bucket or local file system.No error is returned if a folder with the same name as an existing one is created, ", + "doc_type":"utiltg", + "kw":"Creating a Folder,Object Commands,OBS Client Guide (obsutil)", + "search_title":"", + "metedata":[ + { + "prodname":"obs", + "documenttype":"utiltg" + } + ], + "title":"Creating a Folder", + "githuburl":"" + }, + { + "uri":"obs_11_0013.html", + "node_id":"obs_11_0013.xml", + "product_code":"obs", + "code":"15", + "des":"You can use this command to upload one or more local files or folders to a specified path in OBS. These files can be texts, images, videos, or any other type of files.Do ", + "doc_type":"utiltg", + "kw":"Uploading an Object,Object Commands,OBS Client Guide (obsutil)", + "search_title":"", + "metedata":[ + { + "prodname":"obs", + "documenttype":"utiltg" + } + ], + "title":"Uploading an Object", + "githuburl":"" + }, + { + "uri":"obs_11_0015.html", + "node_id":"obs_11_0015.xml", + "product_code":"obs", + "code":"16", + "des":"You can use this command to query the basic properties of an object.In Windowsobsutil stat obs://bucket/key [-acl][-bf=xxx] [-config=xxx]In Linux or macOS./obsutil stat o", + "doc_type":"utiltg", + "kw":"Querying Object Properties,Object Commands,OBS Client Guide (obsutil)", + "search_title":"", + "metedata":[ + { + "prodname":"obs", + "documenttype":"utiltg" + } + ], + "title":"Querying Object Properties", + "githuburl":"" + }, + { + "uri":"obs_11_0041.html", + "node_id":"obs_11_0041.xml", + "product_code":"obs", + "code":"17", + "des":"You can use this command to set properties of an object or set properties of objects in batches by a specified object name prefix.You can set storage classes only for buc", + "doc_type":"utiltg", + "kw":"Setting Object Properties,Object Commands,OBS Client Guide (obsutil)", + "search_title":"", + "metedata":[ + { + "prodname":"obs", + "documenttype":"utiltg" + } + ], + "title":"Setting Object Properties", + "githuburl":"" + }, + { + "uri":"obs_11_0014.html", + "node_id":"obs_11_0014.xml", + "product_code":"obs", + "code":"18", + "des":"You can use this command to query objects or object versions in a bucket. All objects are listed in lexicographical order by object name and version ID.In Windowsobsutil ", + "doc_type":"utiltg", + "kw":"Listing Objects,Object Commands,OBS Client Guide (obsutil)", + "search_title":"", + "metedata":[ + { + "prodname":"obs", + "documenttype":"utiltg" + } + ], + "title":"Listing Objects", + "githuburl":"" + }, + { + "uri":"obs_11_0017.html", + "node_id":"obs_11_0017.xml", + "product_code":"obs", + "code":"19", + "des":"You can use this command to copy a single object or copy objects in batches by a specified object name prefix.Do not change the source objects in the OBS bucket when copy", + "doc_type":"utiltg", + "kw":"Copying an Object,Object Commands,OBS Client Guide (obsutil)", + "search_title":"", + "metedata":[ + { + "prodname":"obs", + "documenttype":"utiltg" + } + ], + "title":"Copying an Object", + "githuburl":"" + }, + { + "uri":"obs_11_0053.html", + "node_id":"obs_11_0053.xml", + "product_code":"obs", + "code":"20", + "des":"You can use this command to move a single object or move objects in batches by a specified object name prefix.Do not change the source objects in the OBS bucket when movi", + "doc_type":"utiltg", + "kw":"Moving an Object,Object Commands,OBS Client Guide (obsutil)", + "search_title":"", + "metedata":[ + { + "prodname":"obs", + "documenttype":"utiltg" + } + ], + "title":"Moving an Object", + "githuburl":"" + }, + { + "uri":"obs_11_0018.html", + "node_id":"obs_11_0018.xml", + "product_code":"obs", + "code":"21", + "des":"You can use this command to download an object or download objects in batches by object name prefix to your local PC.Do not change the source objects in the OBS bucket wh", + "doc_type":"utiltg", + "kw":"Downloading an Object,Object Commands,OBS Client Guide (obsutil)", + "search_title":"", + "metedata":[ + { + "prodname":"obs", + "documenttype":"utiltg" + } + ], + "title":"Downloading an Object", + "githuburl":"" + }, + { + "uri":"obs_11_0051.html", + "node_id":"obs_11_0051.xml", + "product_code":"obs", + "code":"22", + "des":"You can use this command to generate the download link of a specified object in a bucket or generate the download links of objects in a bucket in batches by object name p", + "doc_type":"utiltg", + "kw":"Generating the Download Link of an Object,Object Commands,OBS Client Guide (obsutil)", + "search_title":"", + "metedata":[ + { + "prodname":"obs", + "documenttype":"utiltg" + } + ], + "title":"Generating the Download Link of an Object", + "githuburl":"" + }, + { + "uri":"obs_11_0021.html", + "node_id":"obs_11_0021.xml", + "product_code":"obs", + "code":"23", + "des":"You can use this command to delete a specified object.You can also use this command to delete objects in batches based on a specified object name prefix.The delete operat", + "doc_type":"utiltg", + "kw":"Deleting an Object,Object Commands,OBS Client Guide (obsutil)", + "search_title":"", + "metedata":[ + { + "prodname":"obs", + "documenttype":"utiltg" + } + ], + "title":"Deleting an Object", + "githuburl":"" + }, + { + "uri":"obs_11_0042.html", + "node_id":"obs_11_0042.xml", + "product_code":"obs", + "code":"24", + "des":"You can use this command to synchronize all content in a local source path to the specified target OBS bucket to ensure data consistency. Incremental synchronization has ", + "doc_type":"utiltg", + "kw":"Synchronously Uploading Incremental Objects,Object Commands,OBS Client Guide (obsutil)", + "search_title":"", + "metedata":[ + { + "prodname":"obs", + "documenttype":"utiltg" + } + ], + "title":"Synchronously Uploading Incremental Objects", + "githuburl":"" + }, + { + "uri":"obs_11_0044.html", + "node_id":"obs_11_0044.xml", + "product_code":"obs", + "code":"25", + "des":"You can use this command to synchronize all objects in a specified path of the source bucket to a specified path in the target bucket to ensure data consistency. Incremen", + "doc_type":"utiltg", + "kw":"Synchronously Copying Incremental Objects,Object Commands,OBS Client Guide (obsutil)", + "search_title":"", + "metedata":[ + { + "prodname":"obs", + "documenttype":"utiltg" + } + ], + "title":"Synchronously Copying Incremental Objects", + "githuburl":"" + }, + { + "uri":"obs_11_0043.html", + "node_id":"obs_11_0043.xml", + "product_code":"obs", + "code":"26", + "des":"You can use this command to synchronize all objects in a specified path of the source OBS bucket to a target local path to ensure data consistency. Incremental synchroniz", + "doc_type":"utiltg", + "kw":"Synchronously Downloading Incremental Objects,Object Commands,OBS Client Guide (obsutil)", + "search_title":"", + "metedata":[ + { + "prodname":"obs", + "documenttype":"utiltg" + } + ], + "title":"Synchronously Downloading Incremental Objects", + "githuburl":"" + }, + { + "uri":"obs_11_0016.html", + "node_id":"obs_11_0016.xml", + "product_code":"obs", + "code":"27", + "des":"You can use this command to restore a specified cold object or restore cold objects with a specific prefix in batches.Object content cannot be read during restoration.Aft", + "doc_type":"utiltg", + "kw":"Restoring Objects from the Cold Storage,Object Commands,OBS Client Guide (obsutil)", + "search_title":"", + "metedata":[ + { + "prodname":"obs", + "documenttype":"utiltg" + } + ], + "title":"Restoring Objects from the Cold Storage", + "githuburl":"" + }, + { + "uri":"obs_11_0036.html", + "node_id":"obs_11_0036.xml", + "product_code":"obs", + "code":"28", + "des":"You can use this command to resume a failed upload task based on the task ID.In Windowsobsutil cp -recover=xxx [-arcDir=xxx] [-dryRun] [-f] [-u] [-vlength] [-vmd5] [-j=1]", + "doc_type":"utiltg", + "kw":"Resuming a Failed Upload Task,Object Commands,OBS Client Guide (obsutil)", + "search_title":"", + "metedata":[ + { + "prodname":"obs", + "documenttype":"utiltg" + } + ], + "title":"Resuming a Failed Upload Task", + "githuburl":"" + }, + { + "uri":"obs_11_0037.html", + "node_id":"obs_11_0037.xml", + "product_code":"obs", + "code":"29", + "des":"You can use this command to resume a failed copy task based on the task ID.In Windowsobsutil cp -recover=xxx [-dryRun] [-f] [-u] [-crr] [-vlength] [-vmd5] [-j=1] [-p=1] [", + "doc_type":"utiltg", + "kw":"Resuming a Failed Copy Task,Object Commands,OBS Client Guide (obsutil)", + "search_title":"", + "metedata":[ + { + "prodname":"obs", + "documenttype":"utiltg" + } + ], + "title":"Resuming a Failed Copy Task", + "githuburl":"" + }, + { + "uri":"obs_11_0038.html", + "node_id":"obs_11_0038.xml", + "product_code":"obs", + "code":"30", + "des":"You can use this command to resume a failed download task based on the task ID.In Windowsobsutil cp -recover=xxx [-dryRun] [-tempFileDir=xxx] [-f] [-u] [-vlength] [-vmd5]", + "doc_type":"utiltg", + "kw":"Resuming a Failed Download Task,Object Commands,OBS Client Guide (obsutil)", + "search_title":"", + "metedata":[ + { + "prodname":"obs", + "documenttype":"utiltg" + } + ], + "title":"Resuming a Failed Download Task", + "githuburl":"" + }, + { + "uri":"obs_11_0019.html", + "node_id":"obs_11_0019.xml", + "product_code":"obs", + "code":"31", + "des":"You can use this command to query multipart upload tasks in a bucket.In Windowsobsutil ls obs://bucket[/prefix] [-s] [-d] -m [-a] [-uploadIdMarker=xxx] [-marker=xxx] [-li", + "doc_type":"utiltg", + "kw":"Listing Multipart Upload Tasks,Object Commands,OBS Client Guide (obsutil)", + "search_title":"", + "metedata":[ + { + "prodname":"obs", + "documenttype":"utiltg" + } + ], + "title":"Listing Multipart Upload Tasks", + "githuburl":"" + }, + { + "uri":"obs_11_0020.html", + "node_id":"obs_11_0020.xml", + "product_code":"obs", + "code":"32", + "des":"You can use this command to delete a multipart upload task in a specified bucket by using the multipart upload ID.You can also use this command to delete multipart upload", + "doc_type":"utiltg", + "kw":"Deleting a Multipart Upload Task,Object Commands,OBS Client Guide (obsutil)", + "search_title":"", + "metedata":[ + { + "prodname":"obs", + "documenttype":"utiltg" + } + ], + "title":"Deleting a Multipart Upload Task", + "githuburl":"" + }, + { + "uri":"obs_11_0062.html", + "node_id":"obs_11_0062.xml", + "product_code":"obs", + "code":"33", + "des":"You can use this command to specify the bucket name, object name prefix, and access code to create an authorization code for directory sharing.In Windowsobsutil create-sh", + "doc_type":"utiltg", + "kw":"Creating an Authorization Code for Directory Sharing,Object Commands,OBS Client Guide (obsutil)", + "search_title":"", + "metedata":[ + { + "prodname":"obs", + "documenttype":"utiltg" + } + ], + "title":"Creating an Authorization Code for Directory Sharing", + "githuburl":"" + }, + { + "uri":"obs_11_0063.html", + "node_id":"obs_11_0063.xml", + "product_code":"obs", + "code":"34", + "des":"You can use this command to query objects in a bucket with an authorization code. The returned objects are sorted in lexicographical order.In WindowsEnter an authorizatio", + "doc_type":"utiltg", + "kw":"Listing Objects by Using an Authorization Code,Object Commands,OBS Client Guide (obsutil)", + "search_title":"", + "metedata":[ + { + "prodname":"obs", + "documenttype":"utiltg" + } + ], + "title":"Listing Objects by Using an Authorization Code", + "githuburl":"" + }, + { + "uri":"obs_11_0064.html", + "node_id":"obs_11_0064.xml", + "product_code":"obs", + "code":"35", + "des":"You can use this command to download an object or download objects in a batch by object name prefix to your local PC.Do not change the source objects in the OBS bucket wh", + "doc_type":"utiltg", + "kw":"Downloading Objects by Using an Authorization Code,Object Commands,OBS Client Guide (obsutil)", + "search_title":"", + "metedata":[ + { + "prodname":"obs", + "documenttype":"utiltg" + } + ], + "title":"Downloading Objects by Using an Authorization Code", + "githuburl":"" + }, + { + "uri":"obs_11_0022.html", + "node_id":"obs_11_0022.xml", + "product_code":"obs", + "code":"36", + "des":"HUAWEI CLOUD Help Center presents technical documents to help you quickly get started with HUAWEI CLOUD services. The technical documents include Service Overview, Price Details, Purchase Guide, User Guide, API Reference, Best Practices, FAQs, and Videos.", + "doc_type":"utiltg", + "kw":"Auxiliary Commands", + "search_title":"", + "metedata":[ + { + "prodname":"obs", + "documenttype":"utiltg" + } + ], + "title":"Auxiliary Commands", + "githuburl":"" + }, + { + "uri":"obs_11_0023.html", + "node_id":"obs_11_0023.xml", + "product_code":"obs", + "code":"37", + "des":"You can update items in the .obsutilconfig file, including the endpoint, AK, SK, and token.Configuration Parameters describes parameters in the .obsutilconfig file.In Win", + "doc_type":"utiltg", + "kw":"Updating a Configuration File,Auxiliary Commands,OBS Client Guide (obsutil)", + "search_title":"", + "metedata":[ + { + "prodname":"obs", + "documenttype":"utiltg" + } + ], + "title":"Updating a Configuration File", + "githuburl":"" + }, + { + "uri":"obs_11_0024.html", + "node_id":"obs_11_0024.xml", + "product_code":"obs", + "code":"38", + "des":"You can use this command to delete part records from a specified directory.In Windowsobsutil clear [checkpoint_dir] [-u] [-d] [-c] [-config=xxx]In Linux or macOS./obsutil", + "doc_type":"utiltg", + "kw":"Deleting Part Records,Auxiliary Commands,OBS Client Guide (obsutil)", + "search_title":"", + "metedata":[ + { + "prodname":"obs", + "documenttype":"utiltg" + } + ], + "title":"Deleting Part Records", + "githuburl":"" + }, + { + "uri":"obs_11_0025.html", + "node_id":"obs_11_0025.xml", + "product_code":"obs", + "code":"39", + "des":"You can use this command to view the commands supported by obsutil or view the help information of a specific command.In Windowsobsutil help [command]In Linux or macOS./o", + "doc_type":"utiltg", + "kw":"Viewing Command Help Information,Auxiliary Commands,OBS Client Guide (obsutil)", + "search_title":"", + "metedata":[ + { + "prodname":"obs", + "documenttype":"utiltg" + } + ], + "title":"Viewing Command Help Information", + "githuburl":"" + }, + { + "uri":"obs_11_0026.html", + "node_id":"obs_11_0026.xml", + "product_code":"obs", + "code":"40", + "des":"You can use this command to query the current version of obsutil.In Windowsobsutil versionIn Linux or macOS./obsutil versionTake the Windows OS as an example.", + "doc_type":"utiltg", + "kw":"Querying the Version Number,Auxiliary Commands,OBS Client Guide (obsutil)", + "search_title":"", + "metedata":[ + { + "prodname":"obs", + "documenttype":"utiltg" + } + ], + "title":"Querying the Version Number", + "githuburl":"" + }, + { + "uri":"obs_11_0045.html", + "node_id":"obs_11_0045.xml", + "product_code":"obs", + "code":"41", + "des":"You can use this command to archive log files to a local PC or to a specified bucket.In WindowsArchiving to a local PCobsutil archive [file_or_folder_url] [-config=xxx]Ar", + "doc_type":"utiltg", + "kw":"Archiving Log Files,Auxiliary Commands,OBS Client Guide (obsutil)", + "search_title":"", + "metedata":[ + { + "prodname":"obs", + "documenttype":"utiltg" + } + ], + "title":"Archiving Log Files", + "githuburl":"" + }, + { + "uri":"obs_11_0027.html", + "node_id":"obs_11_0027.xml", + "product_code":"obs", + "code":"42", + "des":"HUAWEI CLOUD Help Center presents technical documents to help you quickly get started with HUAWEI CLOUD services. The technical documents include Service Overview, Price Details, Purchase Guide, User Guide, API Reference, Best Practices, FAQs, and Videos.", + "doc_type":"utiltg", + "kw":"Common Examples", + "search_title":"", + "metedata":[ + { + "prodname":"obs", + "documenttype":"utiltg" + } + ], + "title":"Common Examples", + "githuburl":"" + }, + { + "uri":"obs_11_0028.html", + "node_id":"obs_11_0028.xml", + "product_code":"obs", + "code":"43", + "des":"All commands in this section use the Linux operating system as an example to describe how to upload files.Assume that a local folder is in the following structure:Based o", + "doc_type":"utiltg", + "kw":"Upload,Common Examples,OBS Client Guide (obsutil)", + "search_title":"", + "metedata":[ + { + "prodname":"obs", + "documenttype":"utiltg" + } + ], + "title":"Upload", + "githuburl":"" + }, + { + "uri":"obs_11_0046.html", + "node_id":"obs_11_0046.xml", + "product_code":"obs", + "code":"44", + "des":"All commands in this section use the Linux operating system as an example to describe how to perform synchronous upload operations.Assume that a local folder is in the fo", + "doc_type":"utiltg", + "kw":"Synchronous Upload,Common Examples,OBS Client Guide (obsutil)", + "search_title":"", + "metedata":[ + { + "prodname":"obs", + "documenttype":"utiltg" + } + ], + "title":"Synchronous Upload", + "githuburl":"" + }, + { + "uri":"obs_11_0029.html", + "node_id":"obs_11_0029.xml", + "product_code":"obs", + "code":"45", + "des":"All commands in this section use the Linux operating system as an example to describe how to download files.Assume that bucket bucket-test contains the following objects:", + "doc_type":"utiltg", + "kw":"Download,Common Examples,OBS Client Guide (obsutil)", + "search_title":"", + "metedata":[ + { + "prodname":"obs", + "documenttype":"utiltg" + } + ], + "title":"Download", + "githuburl":"" + }, + { + "uri":"obs_11_0047.html", + "node_id":"obs_11_0047.xml", + "product_code":"obs", + "code":"46", + "des":"All commands in this section use the Linux operating system as an example to describe how to perform synchronous download operations.Assume that bucket bucket-test contai", + "doc_type":"utiltg", + "kw":"Synchronous Download,Common Examples,OBS Client Guide (obsutil)", + "search_title":"", + "metedata":[ + { + "prodname":"obs", + "documenttype":"utiltg" + } + ], + "title":"Synchronous Download", + "githuburl":"" + }, + { + "uri":"obs_11_0030.html", + "node_id":"obs_11_0030.xml", + "product_code":"obs", + "code":"47", + "des":"All commands in this section use the Linux operating system as an example to describe how to copy files.Assume that bucket bucket-src contains the following objects:Based", + "doc_type":"utiltg", + "kw":"Copy,Common Examples,OBS Client Guide (obsutil)", + "search_title":"", + "metedata":[ + { + "prodname":"obs", + "documenttype":"utiltg" + } + ], + "title":"Copy", + "githuburl":"" + }, + { + "uri":"obs_11_0048.html", + "node_id":"obs_11_0048.xml", + "product_code":"obs", + "code":"48", + "des":"All commands in this section use the Linux operating system as an example to describe how to perform synchronous copy operations.Assume that the source bucket bucket-src ", + "doc_type":"utiltg", + "kw":"Synchronous Copy,Common Examples,OBS Client Guide (obsutil)", + "search_title":"", + "metedata":[ + { + "prodname":"obs", + "documenttype":"utiltg" + } + ], + "title":"Synchronous Copy", + "githuburl":"" + }, + { + "uri":"obs_11_0031.html", + "node_id":"obs_11_0031.xml", + "product_code":"obs", + "code":"49", + "des":"All commands in this section use the Linux operating system as an example to describe how to list files.Assume that bucket bucket-test contains the following objects:Base", + "doc_type":"utiltg", + "kw":"Listing,Common Examples,OBS Client Guide (obsutil)", + "search_title":"", + "metedata":[ + { + "prodname":"obs", + "documenttype":"utiltg" + } + ], + "title":"Listing", + "githuburl":"" + }, + { + "uri":"obs_11_0032.html", + "node_id":"obs_11_0032.xml", + "product_code":"obs", + "code":"50", + "des":"All commands in this section use the Linux operating system as an example to describe how to list multipart upload tasks.Assume that bucket bucket-test contains the follo", + "doc_type":"utiltg", + "kw":"Listing Multipart Upload Tasks,Common Examples,OBS Client Guide (obsutil)", + "search_title":"", + "metedata":[ + { + "prodname":"obs", + "documenttype":"utiltg" + } + ], + "title":"Listing Multipart Upload Tasks", + "githuburl":"" + }, + { + "uri":"obs_11_0065.html", + "node_id":"obs_11_0065.xml", + "product_code":"obs", + "code":"51", + "des":"All commands in this section use the Linux operating system as an example to describe how to delete all multipart upload tasks in a bucket.Assume that bucket bucket-test ", + "doc_type":"utiltg", + "kw":"Deleting All Multipart Upload Tasks in a Bucket,Common Examples,OBS Client Guide (obsutil)", + "search_title":"", + "metedata":[ + { + "prodname":"obs", + "documenttype":"utiltg" + } + ], + "title":"Deleting All Multipart Upload Tasks in a Bucket", + "githuburl":"" + }, + { + "uri":"obs_11_0054.html", + "node_id":"obs_11_0054.xml", + "product_code":"obs", + "code":"52", + "des":"HUAWEI CLOUD Help Center presents technical documents to help you quickly get started with HUAWEI CLOUD services. The technical documents include Service Overview, Price Details, Purchase Guide, User Guide, API Reference, Best Practices, FAQs, and Videos.", + "doc_type":"utiltg", + "kw":"Fault Locating", + "search_title":"", + "metedata":[ + { + "prodname":"obs", + "documenttype":"utiltg" + } + ], + "title":"Fault Locating", + "githuburl":"" + }, + { + "uri":"obs_11_0055.html", + "node_id":"obs_11_0055.xml", + "product_code":"obs", + "code":"53", + "des":"obsutil provides multiple methods for users to locate and analyze faults. Table 1 details the methods. Generally, you need to combine these methods for a precise fault lo", + "doc_type":"utiltg", + "kw":"Overview,Fault Locating,OBS Client Guide (obsutil)", + "search_title":"", + "metedata":[ + { + "prodname":"obs", + "documenttype":"utiltg" + } + ], + "title":"Overview", + "githuburl":"" + }, + { + "uri":"obs_11_0056.html", + "node_id":"obs_11_0056.xml", + "product_code":"obs", + "code":"54", + "des":"obsutil log files include tool logs and SDK logs. You can add the following parameters to the .obsutilconfig file to enable the two logging functions.Tool logging (record", + "doc_type":"utiltg", + "kw":"Log Files,Fault Locating,OBS Client Guide (obsutil)", + "search_title":"", + "metedata":[ + { + "prodname":"obs", + "documenttype":"utiltg" + } + ], + "title":"Log Files", + "githuburl":"" + }, + { + "uri":"obs_11_0057.html", + "node_id":"obs_11_0057.xml", + "product_code":"obs", + "code":"55", + "des":"Result files are generated when batch tasks complete. By default, they are saved to the subfolder .obsutil_output in the home directory of the user who executes obsutil c", + "doc_type":"utiltg", + "kw":"Result Lists,Fault Locating,OBS Client Guide (obsutil)", + "search_title":"", + "metedata":[ + { + "prodname":"obs", + "documenttype":"utiltg" + } + ], + "title":"Result Lists", + "githuburl":"" + }, + { + "uri":"obs_11_0058.html", + "node_id":"obs_11_0058.xml", + "product_code":"obs", + "code":"56", + "des":"If obsutil is invoked by processes, the command output cannot be viewed in real time. obsutil generates different return codes based on different execution results. Table", + "doc_type":"utiltg", + "kw":"Return Codes,Fault Locating,OBS Client Guide (obsutil)", + "search_title":"", + "metedata":[ + { + "prodname":"obs", + "documenttype":"utiltg" + } + ], + "title":"Return Codes", + "githuburl":"" + }, + { + "uri":"obs_11_0033.html", + "node_id":"obs_11_0033.xml", + "product_code":"obs", + "code":"57", + "des":"HUAWEI CLOUD Help Center presents technical documents to help you quickly get started with HUAWEI CLOUD services. The technical documents include Service Overview, Price Details, Purchase Guide, User Guide, API Reference, Best Practices, FAQs, and Videos.", + "doc_type":"utiltg", + "kw":"Best Practices", + "search_title":"", + "metedata":[ + { + "prodname":"obs", + "documenttype":"utiltg" + } + ], + "title":"Best Practices", + "githuburl":"" + }, + { + "uri":"obs_11_0066.html", + "node_id":"obs_11_0066.xml", + "product_code":"obs", + "code":"58", + "des":"obsutil provides help commands for viewing the help documents of each command. To query the help document of the bucket creation command, perform the following steps:For ", + "doc_type":"utiltg", + "kw":"Using the obsutil help Command to Search for Functions,Best Practices,OBS Client Guide (obsutil)", + "search_title":"", + "metedata":[ + { + "prodname":"obs", + "documenttype":"utiltg" + } + ], + "title":"Using the obsutil help Command to Search for Functions", + "githuburl":"" + }, + { + "uri":"obs_11_0034.html", + "node_id":"obs_11_0034.xml", + "product_code":"obs", + "code":"59", + "des":"Go to the /root directory at 21:30 every day and upload the /src/src1 folder to bucket obs://bucket-test in the incremental mode.You have properly enabled the scheduled c", + "doc_type":"utiltg", + "kw":"Configuring Scheduled Tasks Using the Crontab Command,Best Practices,OBS Client Guide (obsutil)", + "search_title":"", + "metedata":[ + { + "prodname":"obs", + "documenttype":"utiltg" + } + ], + "title":"Configuring Scheduled Tasks Using the Crontab Command", + "githuburl":"" + }, + { + "uri":"obs_11_0049.html", + "node_id":"obs_11_0049.xml", + "product_code":"obs", + "code":"60", + "des":"Because obsutil is external software, you need to access the directory where obsutil resides before running obsutil commands, which is not convenient.An OS provides built", + "doc_type":"utiltg", + "kw":"Setting obsutil Commands as Built-in Commands,Best Practices,OBS Client Guide (obsutil)", + "search_title":"", + "metedata":[ + { + "prodname":"obs", + "documenttype":"utiltg" + } + ], + "title":"Setting obsutil Commands as Built-in Commands", + "githuburl":"" + }, + { + "uri":"obs_11_0052.html", + "node_id":"obs_11_0052.xml", + "product_code":"obs", + "code":"61", + "des":"By default, obsutil uploads, downloads, and copies files or objects whose size is greater than 50 MB in multiple parts. Table 1 details related parameters in the .obsutil", + "doc_type":"utiltg", + "kw":"Fine-Tuning obsutil Performance,Best Practices,OBS Client Guide (obsutil)", + "search_title":"", + "metedata":[ + { + "prodname":"obs", + "documenttype":"utiltg" + } + ], + "title":"Fine-Tuning obsutil Performance", + "githuburl":"" + }, + { + "uri":"obs_11_0059.html", + "node_id":"obs_11_0059.xml", + "product_code":"obs", + "code":"62", + "des":"obsutil supports resumable data transfer (upload, download, and copy) for large files by using the multipart algorithms for upload, download, and copy. You can set the th", + "doc_type":"utiltg", + "kw":"Using obsutil for Resumable Data Transfer,Best Practices,OBS Client Guide (obsutil)", + "search_title":"", + "metedata":[ + { + "prodname":"obs", + "documenttype":"utiltg" + } + ], + "title":"Using obsutil for Resumable Data Transfer", + "githuburl":"" + }, + { + "uri":"obs_11_0060.html", + "node_id":"obs_11_0060.xml", + "product_code":"obs", + "code":"63", + "des":"obsutil supports the upload of the real path to which the symbolic link points when a file or folder is uploaded. You can specify the command-level parameter link to impl", + "doc_type":"utiltg", + "kw":"Using obsutil to Upload a Symbolic Link,Best Practices,OBS Client Guide (obsutil)", + "search_title":"", + "metedata":[ + { + "prodname":"obs", + "documenttype":"utiltg" + } + ], + "title":"Using obsutil to Upload a Symbolic Link", + "githuburl":"" + }, + { + "uri":"obs_11_0068.html", + "node_id":"obs_11_0068.xml", + "product_code":"obs", + "code":"64", + "des":"You can configure an HTTP proxy in either of the following ways:Method 1: Set the proxyUrl parameter in the .obsutilconfig file, for example, proxyUrl=http://username:pas", + "doc_type":"utiltg", + "kw":"Configuring an HTTP Proxy for obsutil,Best Practices,OBS Client Guide (obsutil)", + "search_title":"", + "metedata":[ + { + "prodname":"obs", + "documenttype":"utiltg" + } + ], + "title":"Configuring an HTTP Proxy for obsutil", + "githuburl":"" + }, + { + "uri":"obs_11_0069.html", + "node_id":"obs_11_0069.xml", + "product_code":"obs", + "code":"65", + "des":"The directory sharing function allows the owner of a bucket to share directories in a bucket or the entire bucket with other users by using the authorization code and acc", + "doc_type":"utiltg", + "kw":"Using obsutil to Share Directories,Best Practices,OBS Client Guide (obsutil)", + "search_title":"", + "metedata":[ + { + "prodname":"obs", + "documenttype":"utiltg" + } + ], + "title":"Using obsutil to Share Directories", + "githuburl":"" + }, + { + "uri":"obs_11_0039.html", + "node_id":"obs_11_0039.xml", + "product_code":"obs", + "code":"66", + "des":"obsutil client supports cross-region replication. You can directly replicate data from a source bucket to the destination bucket through data streams. The source bucket a", + "doc_type":"utiltg", + "kw":"Using obsutil to Replicate Data Across Regions on the Client Side,Best Practices,OBS Client Guide (o", + "search_title":"", + "metedata":[ + { + "prodname":"obs", + "documenttype":"utiltg" + } + ], + "title":"Using obsutil to Replicate Data Across Regions on the Client Side", + "githuburl":"" + }, + { + "uri":"obs_11_0073.html", + "node_id":"obs_11_0073.xml", + "product_code":"obs", + "code":"67", + "des":"obsutil allows you to configure the rateLimitThreshold parameter in the .obsutilconfig file to limit the upload and download rate.For detailed parameter description, see ", + "doc_type":"utiltg", + "kw":"Limiting the Upload and Download Rate for obsutil,Best Practices,OBS Client Guide (obsutil)", + "search_title":"", + "metedata":[ + { + "prodname":"obs", + "documenttype":"utiltg" + } + ], + "title":"Limiting the Upload and Download Rate for obsutil", + "githuburl":"" + }, + { + "uri":"obs_11_0074.html", + "node_id":"obs_11_0074.xml", + "product_code":"obs", + "code":"68", + "des":"HUAWEI CLOUD Help Center presents technical documents to help you quickly get started with HUAWEI CLOUD services. The technical documents include Service Overview, Price Details, Purchase Guide, User Guide, API Reference, Best Practices, FAQs, and Videos.", + "doc_type":"utiltg", + "kw":"FAQs", + "search_title":"", + "metedata":[ + { + "prodname":"obs", + "documenttype":"utiltg" + } + ], + "title":"FAQs", + "githuburl":"" + }, + { + "uri":"obs_11_0075.html", + "node_id":"obs_11_0075.xml", + "product_code":"obs", + "code":"69", + "des":"No.obsutil allows you to upload your local directory to an OBS bucket. After the synchronization, if you delete some files in the local directory and then perform an incr", + "doc_type":"utiltg", + "kw":"After Some Files Are Deleted in My Local Directory, Can obsutil Synchronously Delete Them from the B", + "search_title":"", + "metedata":[ + { + "prodname":"obs", + "documenttype":"utiltg" + } + ], + "title":"After Some Files Are Deleted in My Local Directory, Can obsutil Synchronously Delete Them from the Bucket?", + "githuburl":"" + }, + { + "uri":"obs_11_0076.html", + "node_id":"obs_11_0076.xml", + "product_code":"obs", + "code":"70", + "des":"obsutil does not allow you to directly save a listing result to a local file, but you can redirect a listing result displayed on the screen in standard output to a specif", + "doc_type":"utiltg", + "kw":"Can I Use obsutil to Directly Save a Listing Result to a Local File?,FAQs,OBS Client Guide (obsutil)", + "search_title":"", + "metedata":[ + { + "prodname":"obs", + "documenttype":"utiltg" + } + ], + "title":"Can I Use obsutil to Directly Save a Listing Result to a Local File?", + "githuburl":"" + }, + { + "uri":"obs_11_0077.html", + "node_id":"obs_11_0077.xml", + "product_code":"obs", + "code":"71", + "des":"When you use obsutil to list all objects in a bucket, the listing result contains the total size of the objects. If the total size is different from that on OBS Console o", + "doc_type":"utiltg", + "kw":"Why Is the Size of Objects Queried by obsutil Inconsistent with That on OBS Console?,FAQs,OBS Client", + "search_title":"", + "metedata":[ + { + "prodname":"obs", + "documenttype":"utiltg" + } + ], + "title":"Why Is the Size of Objects Queried by obsutil Inconsistent with That on OBS Console?", + "githuburl":"" + }, + { + "uri":"obs_11_0078.html", + "node_id":"obs_11_0078.xml", + "product_code":"obs", + "code":"72", + "des":"After a batch task is completed, there will be results telling you how many tasks succeeded or failed. To find out why those tasks failed, you can check their failure res", + "doc_type":"utiltg", + "kw":"How Can I Find Out Why Some Tasks in a Batch Task Failed?,FAQs,OBS Client Guide (obsutil)", + "search_title":"", + "metedata":[ + { + "prodname":"obs", + "documenttype":"utiltg" + } + ], + "title":"How Can I Find Out Why Some Tasks in a Batch Task Failed?", + "githuburl":"" + }, + { + "uri":"obs_11_0079.html", + "node_id":"obs_11_0079.xml", + "product_code":"obs", + "code":"73", + "des":"I/O timeout and EOF errors usually occur when requests fail due to network fluctuations. Go through the following list to locate the cause.Ping the bucket domain name (bu", + "doc_type":"utiltg", + "kw":"How Can I Locate and Rectify I/O Timeout and EOF Errors?,FAQs,OBS Client Guide (obsutil)", + "search_title":"", + "metedata":[ + { + "prodname":"obs", + "documenttype":"utiltg" + } + ], + "title":"How Can I Locate and Rectify I/O Timeout and EOF Errors?", + "githuburl":"" + }, + { + "uri":"obs_11_0080.html", + "node_id":"obs_11_0080.xml", + "product_code":"obs", + "code":"74", + "des":"Possible causes:When a batch upload or download task is being executed, if there are a large number of objects involved, obsutil needs to traverse all objects to collect ", + "doc_type":"utiltg", + "kw":"Why Is a Question Mark Displayed in the Batch Task Progress Bar?,FAQs,OBS Client Guide (obsutil)", + "search_title":"", + "metedata":[ + { + "prodname":"obs", + "documenttype":"utiltg" + } + ], + "title":"Why Is a Question Mark Displayed in the Batch Task Progress Bar?", + "githuburl":"" + }, + { + "uri":"obs_11_0081.html", + "node_id":"obs_11_0081.xml", + "product_code":"obs", + "code":"75", + "des":"No.obsutil allows you to configure multiple config files, but they cannot be stored in the same directory due to encryption requirements.If multiple config files are requ", + "doc_type":"utiltg", + "kw":"Can Multiple config Files Be Placed in One Directory?,FAQs,OBS Client Guide (obsutil)", + "search_title":"", + "metedata":[ + { + "prodname":"obs", + "documenttype":"utiltg" + } + ], + "title":"Can Multiple config Files Be Placed in One Directory?", + "githuburl":"" + }, + { + "uri":"obs_11_0084.html", + "node_id":"obs_11_0084.xml", + "product_code":"obs", + "code":"76", + "des":"Yes. You can run the mv command to rename an object or a folder. The following give two examples in Windows.Running obsutil mv obs://bucket-test/key obs://bucket-test/key", + "doc_type":"utiltg", + "kw":"Can I Rename an Object or a Folder?,FAQs,OBS Client Guide (obsutil)", + "search_title":"", + "metedata":[ + { + "prodname":"obs", + "documenttype":"utiltg" + } + ], + "title":"Can I Rename an Object or a Folder?", + "githuburl":"" + }, + { + "uri":"obs_11_0035.html", + "node_id":"obs_11_0035.xml", + "product_code":"obs", + "code":"77", + "des":"You can set obsutil parameters in the .obsutilconfig file.Configuration file format:Table 1 describes the parameters.Set parameters with N/A as the recommended value base", + "doc_type":"utiltg", + "kw":"Configuration Parameters,OBS Client Guide (obsutil)", + "search_title":"", + "metedata":[ + { + "prodname":"obs", + "documenttype":"utiltg" + } + ], + "title":"Configuration Parameters", + "githuburl":"" + }, + { + "uri":"obs_11_0000.html", + "node_id":"obs_11_0000.xml", + "product_code":"obs", + "code":"78", + "des":"HUAWEI CLOUD Help Center presents technical documents to help you quickly get started with HUAWEI CLOUD services. The technical documents include Service Overview, Price Details, Purchase Guide, User Guide, API Reference, Best Practices, FAQs, and Videos.", + "doc_type":"utiltg", + "kw":"Change History,OBS Client Guide (obsutil)", + "search_title":"", + "metedata":[ + { + "prodname":"obs", + "documenttype":"utiltg" + } + ], + "title":"Change History", + "githuburl":"" + } +] \ No newline at end of file diff --git a/docs/obs/tool-obsutil/CLASS.TXT.json b/docs/obs/tool-obsutil/CLASS.TXT.json new file mode 100644 index 000000000..2350690e2 --- /dev/null +++ b/docs/obs/tool-obsutil/CLASS.TXT.json @@ -0,0 +1,704 @@ +[ + { + "desc":"obsutil is a command line tool for accessing and managing OBS. You can use this tool to create buckets and upload, download, or delete files/folders. If you are familiar ", + "product_code":"obs", + "title":"obsutil Introduction", + "uri":"obs_11_0001.html", + "doc_type":"utiltg", + "p_code":"", + "code":"1" + }, + { + "desc":"Table 1 lists the download links of obsutil for different OSs.Download links of obsutilOSSoftware PackageManual Verification Signature FileAutomatic Verification Signatur", + "product_code":"obs", + "title":"Downloading and Installing obsutil", + "uri":"obs_11_0003.html", + "doc_type":"utiltg", + "p_code":"", + "code":"2" + }, + { + "desc":"HUAWEI CLOUD Help Center presents technical documents to help you quickly get started with HUAWEI CLOUD services. The technical documents include Service Overview, Price Details, Purchase Guide, User Guide, API Reference, Best Practices, FAQs, and Videos.", + "product_code":"obs", + "title":"Getting Started", + "uri":"obs_11_0002.html", + "doc_type":"utiltg", + "p_code":"", + "code":"3" + }, + { + "desc":"When you call APIs, you need to use the AK and SK for authentication. To obtain the AK and SK, perform the following steps:This step is required only when you have enable", + "product_code":"obs", + "title":"Creating Access Keys (AK and SK)", + "uri":"obs_11_0061.html", + "doc_type":"utiltg", + "p_code":"3", + "code":"4" + }, + { + "desc":"Before using obsutil, you need to configure the OBS endpoint and AK/SK for obsutil to interconnect with OBS. Then, you can use obsutil to operate OBS buckets and objects.", + "product_code":"obs", + "title":"Initializing the Configuration", + "uri":"obs_11_0005.html", + "doc_type":"utiltg", + "p_code":"3", + "code":"5" + }, + { + "desc":"This section uses the Linux OS as an example to describe how to use obsutil to perform basic operations in OBS. For details, see .You have obtained obsutil and completed ", + "product_code":"obs", + "title":"Quick Start", + "uri":"obs_11_0006.html", + "doc_type":"utiltg", + "p_code":"3", + "code":"6" + }, + { + "desc":"HUAWEI CLOUD Help Center presents technical documents to help you quickly get started with HUAWEI CLOUD services. The technical documents include Service Overview, Price Details, Purchase Guide, User Guide, API Reference, Best Practices, FAQs, and Videos.", + "product_code":"obs", + "title":"Bucket Commands", + "uri":"obs_11_0007.html", + "doc_type":"utiltg", + "p_code":"", + "code":"7" + }, + { + "desc":"You can use this command to create a bucket. A bucket name must be unique in OBS. One account can create a maximum of 100 buckets.If you create a bucket and name it the s", + "product_code":"obs", + "title":"Creating a Bucket", + "uri":"obs_11_0008.html", + "doc_type":"utiltg", + "p_code":"7", + "code":"8" + }, + { + "desc":"You can use this command to obtain the bucket list. In the list, bucket names are displayed in lexicographical order.In Windowsobsutil ls [-s] [-sc] [-du] [-fs] [-j=1] [", + "product_code":"obs", + "title":"Listing Buckets", + "uri":"obs_11_0009.html", + "doc_type":"utiltg", + "p_code":"7", + "code":"9" + }, + { + "desc":"You can use this command to query the basic properties of a bucket, including its default storage class, region, version ID, storage usage, bucket quota, whether it suppo", + "product_code":"obs", + "title":"Querying Bucket Properties", + "uri":"obs_11_0010.html", + "doc_type":"utiltg", + "p_code":"7", + "code":"10" + }, + { + "desc":"You can use this command to set the properties of a bucket, such as storage classes and access policies.In Windowsobsutil chattri obs://bucket [-sc=xxx] [-acl=xxx] [-aclX", + "product_code":"obs", + "title":"Setting Bucket Properties", + "uri":"obs_11_0040.html", + "doc_type":"utiltg", + "p_code":"7", + "code":"11" + }, + { + "desc":"You can use this command to delete a bucket. The bucket to be deleted must be empty (containing no objects, historical versions, or fragments).To delete a non-empty bucke", + "product_code":"obs", + "title":"Deleting a Bucket", + "uri":"obs_11_0011.html", + "doc_type":"utiltg", + "p_code":"7", + "code":"12" + }, + { + "desc":"HUAWEI CLOUD Help Center presents technical documents to help you quickly get started with HUAWEI CLOUD services. The technical documents include Service Overview, Price Details, Purchase Guide, User Guide, API Reference, Best Practices, FAQs, and Videos.", + "product_code":"obs", + "title":"Object Commands", + "uri":"obs_11_0012.html", + "doc_type":"utiltg", + "p_code":"", + "code":"13" + }, + { + "desc":"You can use this command to create a folder in a specified bucket or local file system.No error is returned if a folder with the same name as an existing one is created, ", + "product_code":"obs", + "title":"Creating a Folder", + "uri":"obs_11_0050.html", + "doc_type":"utiltg", + "p_code":"13", + "code":"14" + }, + { + "desc":"You can use this command to upload one or more local files or folders to a specified path in OBS. These files can be texts, images, videos, or any other type of files.Do ", + "product_code":"obs", + "title":"Uploading an Object", + "uri":"obs_11_0013.html", + "doc_type":"utiltg", + "p_code":"13", + "code":"15" + }, + { + "desc":"You can use this command to query the basic properties of an object.In Windowsobsutil stat obs://bucket/key [-acl][-bf=xxx] [-config=xxx]In Linux or macOS./obsutil stat o", + "product_code":"obs", + "title":"Querying Object Properties", + "uri":"obs_11_0015.html", + "doc_type":"utiltg", + "p_code":"13", + "code":"16" + }, + { + "desc":"You can use this command to set properties of an object or set properties of objects in batches by a specified object name prefix.You can set storage classes only for buc", + "product_code":"obs", + "title":"Setting Object Properties", + "uri":"obs_11_0041.html", + "doc_type":"utiltg", + "p_code":"13", + "code":"17" + }, + { + "desc":"You can use this command to query objects or object versions in a bucket. All objects are listed in lexicographical order by object name and version ID.In Windowsobsutil ", + "product_code":"obs", + "title":"Listing Objects", + "uri":"obs_11_0014.html", + "doc_type":"utiltg", + "p_code":"13", + "code":"18" + }, + { + "desc":"You can use this command to copy a single object or copy objects in batches by a specified object name prefix.Do not change the source objects in the OBS bucket when copy", + "product_code":"obs", + "title":"Copying an Object", + "uri":"obs_11_0017.html", + "doc_type":"utiltg", + "p_code":"13", + "code":"19" + }, + { + "desc":"You can use this command to move a single object or move objects in batches by a specified object name prefix.Do not change the source objects in the OBS bucket when movi", + "product_code":"obs", + "title":"Moving an Object", + "uri":"obs_11_0053.html", + "doc_type":"utiltg", + "p_code":"13", + "code":"20" + }, + { + "desc":"You can use this command to download an object or download objects in batches by object name prefix to your local PC.Do not change the source objects in the OBS bucket wh", + "product_code":"obs", + "title":"Downloading an Object", + "uri":"obs_11_0018.html", + "doc_type":"utiltg", + "p_code":"13", + "code":"21" + }, + { + "desc":"You can use this command to generate the download link of a specified object in a bucket or generate the download links of objects in a bucket in batches by object name p", + "product_code":"obs", + "title":"Generating the Download Link of an Object", + "uri":"obs_11_0051.html", + "doc_type":"utiltg", + "p_code":"13", + "code":"22" + }, + { + "desc":"You can use this command to delete a specified object.You can also use this command to delete objects in batches based on a specified object name prefix.The delete operat", + "product_code":"obs", + "title":"Deleting an Object", + "uri":"obs_11_0021.html", + "doc_type":"utiltg", + "p_code":"13", + "code":"23" + }, + { + "desc":"You can use this command to synchronize all content in a local source path to the specified target OBS bucket to ensure data consistency. Incremental synchronization has ", + "product_code":"obs", + "title":"Synchronously Uploading Incremental Objects", + "uri":"obs_11_0042.html", + "doc_type":"utiltg", + "p_code":"13", + "code":"24" + }, + { + "desc":"You can use this command to synchronize all objects in a specified path of the source bucket to a specified path in the target bucket to ensure data consistency. Incremen", + "product_code":"obs", + "title":"Synchronously Copying Incremental Objects", + "uri":"obs_11_0044.html", + "doc_type":"utiltg", + "p_code":"13", + "code":"25" + }, + { + "desc":"You can use this command to synchronize all objects in a specified path of the source OBS bucket to a target local path to ensure data consistency. Incremental synchroniz", + "product_code":"obs", + "title":"Synchronously Downloading Incremental Objects", + "uri":"obs_11_0043.html", + "doc_type":"utiltg", + "p_code":"13", + "code":"26" + }, + { + "desc":"You can use this command to restore a specified cold object or restore cold objects with a specific prefix in batches.Object content cannot be read during restoration.Aft", + "product_code":"obs", + "title":"Restoring Objects from the Cold Storage", + "uri":"obs_11_0016.html", + "doc_type":"utiltg", + "p_code":"13", + "code":"27" + }, + { + "desc":"You can use this command to resume a failed upload task based on the task ID.In Windowsobsutil cp -recover=xxx [-arcDir=xxx] [-dryRun] [-f] [-u] [-vlength] [-vmd5] [-j=1]", + "product_code":"obs", + "title":"Resuming a Failed Upload Task", + "uri":"obs_11_0036.html", + "doc_type":"utiltg", + "p_code":"13", + "code":"28" + }, + { + "desc":"You can use this command to resume a failed copy task based on the task ID.In Windowsobsutil cp -recover=xxx [-dryRun] [-f] [-u] [-crr] [-vlength] [-vmd5] [-j=1] [-p=1] [", + "product_code":"obs", + "title":"Resuming a Failed Copy Task", + "uri":"obs_11_0037.html", + "doc_type":"utiltg", + "p_code":"13", + "code":"29" + }, + { + "desc":"You can use this command to resume a failed download task based on the task ID.In Windowsobsutil cp -recover=xxx [-dryRun] [-tempFileDir=xxx] [-f] [-u] [-vlength] [-vmd5]", + "product_code":"obs", + "title":"Resuming a Failed Download Task", + "uri":"obs_11_0038.html", + "doc_type":"utiltg", + "p_code":"13", + "code":"30" + }, + { + "desc":"You can use this command to query multipart upload tasks in a bucket.In Windowsobsutil ls obs://bucket[/prefix] [-s] [-d] -m [-a] [-uploadIdMarker=xxx] [-marker=xxx] [-li", + "product_code":"obs", + "title":"Listing Multipart Upload Tasks", + "uri":"obs_11_0019.html", + "doc_type":"utiltg", + "p_code":"13", + "code":"31" + }, + { + "desc":"You can use this command to delete a multipart upload task in a specified bucket by using the multipart upload ID.You can also use this command to delete multipart upload", + "product_code":"obs", + "title":"Deleting a Multipart Upload Task", + "uri":"obs_11_0020.html", + "doc_type":"utiltg", + "p_code":"13", + "code":"32" + }, + { + "desc":"You can use this command to specify the bucket name, object name prefix, and access code to create an authorization code for directory sharing.In Windowsobsutil create-sh", + "product_code":"obs", + "title":"Creating an Authorization Code for Directory Sharing", + "uri":"obs_11_0062.html", + "doc_type":"utiltg", + "p_code":"13", + "code":"33" + }, + { + "desc":"You can use this command to query objects in a bucket with an authorization code. The returned objects are sorted in lexicographical order.In WindowsEnter an authorizatio", + "product_code":"obs", + "title":"Listing Objects by Using an Authorization Code", + "uri":"obs_11_0063.html", + "doc_type":"utiltg", + "p_code":"13", + "code":"34" + }, + { + "desc":"You can use this command to download an object or download objects in a batch by object name prefix to your local PC.Do not change the source objects in the OBS bucket wh", + "product_code":"obs", + "title":"Downloading Objects by Using an Authorization Code", + "uri":"obs_11_0064.html", + "doc_type":"utiltg", + "p_code":"13", + "code":"35" + }, + { + "desc":"HUAWEI CLOUD Help Center presents technical documents to help you quickly get started with HUAWEI CLOUD services. The technical documents include Service Overview, Price Details, Purchase Guide, User Guide, API Reference, Best Practices, FAQs, and Videos.", + "product_code":"obs", + "title":"Auxiliary Commands", + "uri":"obs_11_0022.html", + "doc_type":"utiltg", + "p_code":"", + "code":"36" + }, + { + "desc":"You can update items in the .obsutilconfig file, including the endpoint, AK, SK, and token.Configuration Parameters describes parameters in the .obsutilconfig file.In Win", + "product_code":"obs", + "title":"Updating a Configuration File", + "uri":"obs_11_0023.html", + "doc_type":"utiltg", + "p_code":"36", + "code":"37" + }, + { + "desc":"You can use this command to delete part records from a specified directory.In Windowsobsutil clear [checkpoint_dir] [-u] [-d] [-c] [-config=xxx]In Linux or macOS./obsutil", + "product_code":"obs", + "title":"Deleting Part Records", + "uri":"obs_11_0024.html", + "doc_type":"utiltg", + "p_code":"36", + "code":"38" + }, + { + "desc":"You can use this command to view the commands supported by obsutil or view the help information of a specific command.In Windowsobsutil help [command]In Linux or macOS./o", + "product_code":"obs", + "title":"Viewing Command Help Information", + "uri":"obs_11_0025.html", + "doc_type":"utiltg", + "p_code":"36", + "code":"39" + }, + { + "desc":"You can use this command to query the current version of obsutil.In Windowsobsutil versionIn Linux or macOS./obsutil versionTake the Windows OS as an example.", + "product_code":"obs", + "title":"Querying the Version Number", + "uri":"obs_11_0026.html", + "doc_type":"utiltg", + "p_code":"36", + "code":"40" + }, + { + "desc":"You can use this command to archive log files to a local PC or to a specified bucket.In WindowsArchiving to a local PCobsutil archive [file_or_folder_url] [-config=xxx]Ar", + "product_code":"obs", + "title":"Archiving Log Files", + "uri":"obs_11_0045.html", + "doc_type":"utiltg", + "p_code":"36", + "code":"41" + }, + { + "desc":"HUAWEI CLOUD Help Center presents technical documents to help you quickly get started with HUAWEI CLOUD services. The technical documents include Service Overview, Price Details, Purchase Guide, User Guide, API Reference, Best Practices, FAQs, and Videos.", + "product_code":"obs", + "title":"Common Examples", + "uri":"obs_11_0027.html", + "doc_type":"utiltg", + "p_code":"", + "code":"42" + }, + { + "desc":"All commands in this section use the Linux operating system as an example to describe how to upload files.Assume that a local folder is in the following structure:Based o", + "product_code":"obs", + "title":"Upload", + "uri":"obs_11_0028.html", + "doc_type":"utiltg", + "p_code":"42", + "code":"43" + }, + { + "desc":"All commands in this section use the Linux operating system as an example to describe how to perform synchronous upload operations.Assume that a local folder is in the fo", + "product_code":"obs", + "title":"Synchronous Upload", + "uri":"obs_11_0046.html", + "doc_type":"utiltg", + "p_code":"42", + "code":"44" + }, + { + "desc":"All commands in this section use the Linux operating system as an example to describe how to download files.Assume that bucket bucket-test contains the following objects:", + "product_code":"obs", + "title":"Download", + "uri":"obs_11_0029.html", + "doc_type":"utiltg", + "p_code":"42", + "code":"45" + }, + { + "desc":"All commands in this section use the Linux operating system as an example to describe how to perform synchronous download operations.Assume that bucket bucket-test contai", + "product_code":"obs", + "title":"Synchronous Download", + "uri":"obs_11_0047.html", + "doc_type":"utiltg", + "p_code":"42", + "code":"46" + }, + { + "desc":"All commands in this section use the Linux operating system as an example to describe how to copy files.Assume that bucket bucket-src contains the following objects:Based", + "product_code":"obs", + "title":"Copy", + "uri":"obs_11_0030.html", + "doc_type":"utiltg", + "p_code":"42", + "code":"47" + }, + { + "desc":"All commands in this section use the Linux operating system as an example to describe how to perform synchronous copy operations.Assume that the source bucket bucket-src ", + "product_code":"obs", + "title":"Synchronous Copy", + "uri":"obs_11_0048.html", + "doc_type":"utiltg", + "p_code":"42", + "code":"48" + }, + { + "desc":"All commands in this section use the Linux operating system as an example to describe how to list files.Assume that bucket bucket-test contains the following objects:Base", + "product_code":"obs", + "title":"Listing", + "uri":"obs_11_0031.html", + "doc_type":"utiltg", + "p_code":"42", + "code":"49" + }, + { + "desc":"All commands in this section use the Linux operating system as an example to describe how to list multipart upload tasks.Assume that bucket bucket-test contains the follo", + "product_code":"obs", + "title":"Listing Multipart Upload Tasks", + "uri":"obs_11_0032.html", + "doc_type":"utiltg", + "p_code":"42", + "code":"50" + }, + { + "desc":"All commands in this section use the Linux operating system as an example to describe how to delete all multipart upload tasks in a bucket.Assume that bucket bucket-test ", + "product_code":"obs", + "title":"Deleting All Multipart Upload Tasks in a Bucket", + "uri":"obs_11_0065.html", + "doc_type":"utiltg", + "p_code":"42", + "code":"51" + }, + { + "desc":"HUAWEI CLOUD Help Center presents technical documents to help you quickly get started with HUAWEI CLOUD services. The technical documents include Service Overview, Price Details, Purchase Guide, User Guide, API Reference, Best Practices, FAQs, and Videos.", + "product_code":"obs", + "title":"Fault Locating", + "uri":"obs_11_0054.html", + "doc_type":"utiltg", + "p_code":"", + "code":"52" + }, + { + "desc":"obsutil provides multiple methods for users to locate and analyze faults. Table 1 details the methods. Generally, you need to combine these methods for a precise fault lo", + "product_code":"obs", + "title":"Overview", + "uri":"obs_11_0055.html", + "doc_type":"utiltg", + "p_code":"52", + "code":"53" + }, + { + "desc":"obsutil log files include tool logs and SDK logs. You can add the following parameters to the .obsutilconfig file to enable the two logging functions.Tool logging (record", + "product_code":"obs", + "title":"Log Files", + "uri":"obs_11_0056.html", + "doc_type":"utiltg", + "p_code":"52", + "code":"54" + }, + { + "desc":"Result files are generated when batch tasks complete. By default, they are saved to the subfolder .obsutil_output in the home directory of the user who executes obsutil c", + "product_code":"obs", + "title":"Result Lists", + "uri":"obs_11_0057.html", + "doc_type":"utiltg", + "p_code":"52", + "code":"55" + }, + { + "desc":"If obsutil is invoked by processes, the command output cannot be viewed in real time. obsutil generates different return codes based on different execution results. Table", + "product_code":"obs", + "title":"Return Codes", + "uri":"obs_11_0058.html", + "doc_type":"utiltg", + "p_code":"52", + "code":"56" + }, + { + "desc":"HUAWEI CLOUD Help Center presents technical documents to help you quickly get started with HUAWEI CLOUD services. The technical documents include Service Overview, Price Details, Purchase Guide, User Guide, API Reference, Best Practices, FAQs, and Videos.", + "product_code":"obs", + "title":"Best Practices", + "uri":"obs_11_0033.html", + "doc_type":"utiltg", + "p_code":"", + "code":"57" + }, + { + "desc":"obsutil provides help commands for viewing the help documents of each command. To query the help document of the bucket creation command, perform the following steps:For ", + "product_code":"obs", + "title":"Using the obsutil help Command to Search for Functions", + "uri":"obs_11_0066.html", + "doc_type":"utiltg", + "p_code":"57", + "code":"58" + }, + { + "desc":"Go to the /root directory at 21:30 every day and upload the /src/src1 folder to bucket obs://bucket-test in the incremental mode.You have properly enabled the scheduled c", + "product_code":"obs", + "title":"Configuring Scheduled Tasks Using the Crontab Command", + "uri":"obs_11_0034.html", + "doc_type":"utiltg", + "p_code":"57", + "code":"59" + }, + { + "desc":"Because obsutil is external software, you need to access the directory where obsutil resides before running obsutil commands, which is not convenient.An OS provides built", + "product_code":"obs", + "title":"Setting obsutil Commands as Built-in Commands", + "uri":"obs_11_0049.html", + "doc_type":"utiltg", + "p_code":"57", + "code":"60" + }, + { + "desc":"By default, obsutil uploads, downloads, and copies files or objects whose size is greater than 50 MB in multiple parts. Table 1 details related parameters in the .obsutil", + "product_code":"obs", + "title":"Fine-Tuning obsutil Performance", + "uri":"obs_11_0052.html", + "doc_type":"utiltg", + "p_code":"57", + "code":"61" + }, + { + "desc":"obsutil supports resumable data transfer (upload, download, and copy) for large files by using the multipart algorithms for upload, download, and copy. You can set the th", + "product_code":"obs", + "title":"Using obsutil for Resumable Data Transfer", + "uri":"obs_11_0059.html", + "doc_type":"utiltg", + "p_code":"57", + "code":"62" + }, + { + "desc":"obsutil supports the upload of the real path to which the symbolic link points when a file or folder is uploaded. You can specify the command-level parameter link to impl", + "product_code":"obs", + "title":"Using obsutil to Upload a Symbolic Link", + "uri":"obs_11_0060.html", + "doc_type":"utiltg", + "p_code":"57", + "code":"63" + }, + { + "desc":"You can configure an HTTP proxy in either of the following ways:Method 1: Set the proxyUrl parameter in the .obsutilconfig file, for example, proxyUrl=http://username:pas", + "product_code":"obs", + "title":"Configuring an HTTP Proxy for obsutil", + "uri":"obs_11_0068.html", + "doc_type":"utiltg", + "p_code":"57", + "code":"64" + }, + { + "desc":"The directory sharing function allows the owner of a bucket to share directories in a bucket or the entire bucket with other users by using the authorization code and acc", + "product_code":"obs", + "title":"Using obsutil to Share Directories", + "uri":"obs_11_0069.html", + "doc_type":"utiltg", + "p_code":"57", + "code":"65" + }, + { + "desc":"obsutil client supports cross-region replication. You can directly replicate data from a source bucket to the destination bucket through data streams. The source bucket a", + "product_code":"obs", + "title":"Using obsutil to Replicate Data Across Regions on the Client Side", + "uri":"obs_11_0039.html", + "doc_type":"utiltg", + "p_code":"57", + "code":"66" + }, + { + "desc":"obsutil allows you to configure the rateLimitThreshold parameter in the .obsutilconfig file to limit the upload and download rate.For detailed parameter description, see ", + "product_code":"obs", + "title":"Limiting the Upload and Download Rate for obsutil", + "uri":"obs_11_0073.html", + "doc_type":"utiltg", + "p_code":"57", + "code":"67" + }, + { + "desc":"HUAWEI CLOUD Help Center presents technical documents to help you quickly get started with HUAWEI CLOUD services. The technical documents include Service Overview, Price Details, Purchase Guide, User Guide, API Reference, Best Practices, FAQs, and Videos.", + "product_code":"obs", + "title":"FAQs", + "uri":"obs_11_0074.html", + "doc_type":"utiltg", + "p_code":"", + "code":"68" + }, + { + "desc":"No.obsutil allows you to upload your local directory to an OBS bucket. After the synchronization, if you delete some files in the local directory and then perform an incr", + "product_code":"obs", + "title":"After Some Files Are Deleted in My Local Directory, Can obsutil Synchronously Delete Them from the Bucket?", + "uri":"obs_11_0075.html", + "doc_type":"utiltg", + "p_code":"68", + "code":"69" + }, + { + "desc":"obsutil does not allow you to directly save a listing result to a local file, but you can redirect a listing result displayed on the screen in standard output to a specif", + "product_code":"obs", + "title":"Can I Use obsutil to Directly Save a Listing Result to a Local File?", + "uri":"obs_11_0076.html", + "doc_type":"utiltg", + "p_code":"68", + "code":"70" + }, + { + "desc":"When you use obsutil to list all objects in a bucket, the listing result contains the total size of the objects. If the total size is different from that on OBS Console o", + "product_code":"obs", + "title":"Why Is the Size of Objects Queried by obsutil Inconsistent with That on OBS Console?", + "uri":"obs_11_0077.html", + "doc_type":"utiltg", + "p_code":"68", + "code":"71" + }, + { + "desc":"After a batch task is completed, there will be results telling you how many tasks succeeded or failed. To find out why those tasks failed, you can check their failure res", + "product_code":"obs", + "title":"How Can I Find Out Why Some Tasks in a Batch Task Failed?", + "uri":"obs_11_0078.html", + "doc_type":"utiltg", + "p_code":"68", + "code":"72" + }, + { + "desc":"I/O timeout and EOF errors usually occur when requests fail due to network fluctuations. Go through the following list to locate the cause.Ping the bucket domain name (bu", + "product_code":"obs", + "title":"How Can I Locate and Rectify I/O Timeout and EOF Errors?", + "uri":"obs_11_0079.html", + "doc_type":"utiltg", + "p_code":"68", + "code":"73" + }, + { + "desc":"Possible causes:When a batch upload or download task is being executed, if there are a large number of objects involved, obsutil needs to traverse all objects to collect ", + "product_code":"obs", + "title":"Why Is a Question Mark Displayed in the Batch Task Progress Bar?", + "uri":"obs_11_0080.html", + "doc_type":"utiltg", + "p_code":"68", + "code":"74" + }, + { + "desc":"No.obsutil allows you to configure multiple config files, but they cannot be stored in the same directory due to encryption requirements.If multiple config files are requ", + "product_code":"obs", + "title":"Can Multiple config Files Be Placed in One Directory?", + "uri":"obs_11_0081.html", + "doc_type":"utiltg", + "p_code":"68", + "code":"75" + }, + { + "desc":"Yes. You can run the mv command to rename an object or a folder. The following give two examples in Windows.Running obsutil mv obs://bucket-test/key obs://bucket-test/key", + "product_code":"obs", + "title":"Can I Rename an Object or a Folder?", + "uri":"obs_11_0084.html", + "doc_type":"utiltg", + "p_code":"68", + "code":"76" + }, + { + "desc":"You can set obsutil parameters in the .obsutilconfig file.Configuration file format:Table 1 describes the parameters.Set parameters with N/A as the recommended value base", + "product_code":"obs", + "title":"Configuration Parameters", + "uri":"obs_11_0035.html", + "doc_type":"utiltg", + "p_code":"", + "code":"77" + }, + { + "desc":"HUAWEI CLOUD Help Center presents technical documents to help you quickly get started with HUAWEI CLOUD services. The technical documents include Service Overview, Price Details, Purchase Guide, User Guide, API Reference, Best Practices, FAQs, and Videos.", + "product_code":"obs", + "title":"Change History", + "uri":"obs_11_0000.html", + "doc_type":"utiltg", + "p_code":"", + "code":"78" + } +] \ No newline at end of file diff --git a/docs/obs/tool-obsutil/PARAMETERS.txt b/docs/obs/tool-obsutil/PARAMETERS.txt new file mode 100644 index 000000000..6da8d5f07 --- /dev/null +++ b/docs/obs/tool-obsutil/PARAMETERS.txt @@ -0,0 +1,3 @@ +version="" +language="en-us" +type="" \ No newline at end of file diff --git a/docs/obs/tool-obsutil/obs_11_0000.html b/docs/obs/tool-obsutil/obs_11_0000.html new file mode 100644 index 000000000..3f526d12f --- /dev/null +++ b/docs/obs/tool-obsutil/obs_11_0000.html @@ -0,0 +1,33 @@ + + +
Released On + |
+Description + |
+
|---|---|
2026-02-12 + |
+This issue is the third official release. +Updated Downloading and Installing obsutil by adding obsutil signature files. + |
+
2025-12-03 + |
+This issue is the second official release. +Updated Downloading and Installing obsutil by adding download links of obsutil. + |
+
2025-11-21 + |
+This issue is the first official release. + |
+
obsutil is a command line tool for accessing and managing OBS. You can use this tool to create buckets and upload, download, or delete files/folders. If you are familiar with the command line interface (CLI), obsutil is a good choice in batch processing and automatic tasks.
+obsutil is compatible with Windows, Linux, and macOS. Table 1 lists the recommended operating system (OS) versions.
+ +OS + |
+Recommended Version + |
+
|---|---|
Windows + |
+
|
+
Linux + |
+
|
+
macOS + |
+macOS 10.13.4 + |
+
obsutil has the following advantages:
+Table 2 lists the functions of obsutil.
+ +Function + |
+Description + |
+
|---|---|
| + | +Allows you to: +
|
+
| + | +Allows you to upload, download, delete, and list objects. In detail, you can: +
|
+
| + | +Provides logging on your client to record operations on buckets and objects for analysis. + |
+
Below describes how to use commands in obsutil:
+
Enter "exit" or "quit" to logout +Enter "help" or "help command" to show help docs +Input your command: +-->ls -limit=3 -s +obs://bucket-001 +obs://bucket-002 +obs://bucket-003 +Bucket number: 3 + +Input your command: +-->+
You can download obsutil and then use it without installation. Methods of downloading obsutil vary depending on the OS type.
+
Make sure that your cloud server has been connected to the Internet, or the obsutil installation will fail.
+Windows
+Linux
+Linux AMD (64-bit) and Linux x86 (64-bit):
+
tar -xzvf obsutil_linux_amd64.tar.gz+
ll + +dr-x------ 2 root root 4096 Jan 5 2024 obsutil_linux_amd64_x.x.x +-rw------- 1 root root 3845484 Mar 27 17:05 obsutil_linux_amd64.tar.gz+
cd obsutil_linux_amd64_x.x.x+
chmod 755 obsutil+
This step is required, or error "No such file or directory" will be reported when you are querying the obsutil version number.
+./obsutil version + +obsutil version:5.7.9, obssdk version:3.24.12 +operating system:linux, arch:amd64+
macOS
+chmod 755 obsutil+
Before using obsutil, you need to configure the OBS endpoint and AK/SK for obsutil to interconnect with OBS. Then, you can use obsutil to operate OBS buckets and objects.
+Run the config command (for more information about config, see Updating a Configuration File):
+obsutil config -i=xxxxx -k=xxxxx -e=xxxxx+
Using a temporary AK/SK pair and a security token:
+obsutil config -i=xxxxx -k=xxxxx -t=xxxxx -e=xxxxx+
./obsutil config -i=xxxxx -k=xxxx -e=xxxxx+
Using a temporary AK/SK pair and a security token:
+./obsutil config -i=xxxxx -k=xxxxx -t=xxxxx -e=xxxxx+ +
Parameter + |
+Optional or Mandatory + |
+Description + |
+
|---|---|---|
i + |
+Mandatory + |
+AK in permanent or temporary security credentials + |
+
k + |
+Mandatory + |
+SK in permanent or temporary security credentials + |
+
e + |
+Mandatory + |
+Endpoint for accessing OBS, which can contain the protocol type, domain name, and port number (optional), for example, https://your-endpoint:443. (For security purposes, you are advised to use HTTPS. The port number 443 can be omitted.) + |
+
t + |
+Optional + |
+Security token in the temporary security credentials. It is mandatory when temporary security credentials are used. + |
+
dir+
ls -a+
or
+ls -al+
Method 3: Initialize obsutil in interactive mode.
+Using a permanent AK/SK pair (you do not need to enter a token, and press Enter to skip it):
+obsutil config -interactive + +Please input your ak: +xxxxxxxxxxxxxxxxxxxxxxxxx +Please input your sk: +xxxxxxxxxxxxxxxxxxxxxxxxx +Please input your endpoint: +xxxxxxxxxxxxxxxxxxxxxxxxx +Please input your token: + +Config file url: + C:\Users\tools\.obsutilconfig + +Update config file successfully!+
Using a temporary AK/SK pair and a security token:
+obsutil config -interactive + +Please input your ak: +xxxxxxxxxxxxxxxxxxxxxxxxx +Please input your sk: +xxxxxxxxxxxxxxxxxxxxxxxxx +Please input your endpoint: +xxxxxxxxxxxxxxxxxxxxxxxxx +Please input your token: +xxxxxxxxxxxxxxxxxxxxxxxxx + +Config file url: + C:\Users\tools\.obsutilconfig + +Update config file successfully!+
Using a permanent AK/SK pair (you do not need to enter a token, and press Enter to skip it):
+./obsutil config -interactive + +Please input your ak: +xxxxxxxxxxxxxxxxxxxxxxxxx +Please input your sk: +xxxxxxxxxxxxxxxxxxxxxxxxx +Please input your endpoint: +xxxxxxxxxxxxxxxxxxxxxxxxx +Please input your token: + +Config file url: + /root/.obsutilconfig + +Update config file successfully!+
Using a temporary AK/SK pair and a security token:
+./obsutil config -interactive + +Please input your ak: +xxxxxxxxxxxxxxxxxxxxxxxxx +Please input your sk: +xxxxxxxxxxxxxxxxxxxxxxxxx +Please input your endpoint: +xxxxxxxxxxxxxxxxxxxxxxxxx +Please input your token: +xxxxxxxxxxxxxxxxxxxxxxxxx + +Config file url: + /root/.obsutilconfig + +Update config file successfully!+
After the initial configuration is complete, run the following command to check the connectivity:
+obsutil ls -s+
./obsutil ls -s+
Check the command output:
+
If the command output contains "Http status [403]", you may not have the required permissions for obtaining the bucket list. A further analysis is required to identify the root cause.
+This section uses the Linux OS as an example to describe how to use obsutil to perform basic operations in OBS. For details, see .
+./obsutil mb obs://bucket-test + +Create bucket [bucket-test] successfully!+
./obsutil cp /temp/test.txt obs://bucket-test/test.txt + +Parallel: 5 Jobs: 5 +Threshold: 52428800 PartSize: 5242880 +VerifyLength: false VerifyMd5: false +CheckpointDir: /temp/.obsutil_checkpoint + +test.txt:[==============================================] 100.00% 48.47 KB/s 0s +Upload successfully, 4.44KB, /temp/test.txt --> obs://bucket-test1/test.txt+
To upload local folder test to the OBS bucket, run the following command:
+./obsutil cp /test/ obs://bucket-test -r -f+
./obsutil cp obs://bucket-test/test.txt /temp/test1.txt + +Parallel: 5 Jobs: 5 +Threshold: 52428800 PartSize: 5242880 +VerifyLength: false VerifyMd5: false +CheckpointDir: /temp/.obsutil_checkpoint + +test.txt:[=============================================] 100.00% 775.52 KB/s 0s +Download successfully, 4.44KB, obs://bucket-test1/test.txt --> /temp/test1.txt+
To download directory test from the OBS bucket to the local folder temp, run the following command:
+./obsutil cp obs://bucket-test/test /temp -r -f+
./obsutil rm obs://bucket-test/test.txt -f + +Delete object [test.txt] in the bucket [bucket-test] successfully!+
./obsutil rm obs://bucket-test -f + +Delete bucket [bucket-test] successfully!+
You can use this command to create a bucket. A bucket name must be unique in OBS. One account can create a maximum of 100 buckets.
+
If you create a bucket and name it the same as an existing one in the same account and region, no error will be reported and status code 200 is returned. The bucket properties comply with those set in the first creation request. In other cases, creating a bucket with the same name as an existing one will receive the status code 409, indicating that the bucket already exists.
+obsutil mb obs://bucket [-fs] [-acl=xxx] [-sc=xxx] [-location=xxx] [-config=xxx]+
./obsutil mb obs://bucket [-fs] [-acl=xxx] [-sc=xxx] [-location=xxx] [-config=xxx]+
obsutil mb obs://bucket-test +Start at 2024-09-29 07:52:11.3769487 +0000 UTC + +Create bucket [bucket-test] successfully, request id [000001923CC401864018BA75753D2D5F] ++
obsutil mb obs://bucket001 +Start at 2024-09-30 07:03:50.1378331 +0000 UTC + +Create bucket [bucket001] failed, status [409], error code [BucketAlreadyExists], error message [The requested bucket name is not available. The bucket namespace is shared by all users of the system. Please select a different name and try again.], request id [0000019241BE18DB4019EDD66E135C56]+
Parameter + |
+Optional or Mandatory + |
+Description + |
+
|---|---|---|
bucket + |
+Mandatory + |
+The bucket name +A bucket name:
+
|
+
fs + |
+Optional (additional parameter) + |
+Creates a parallel file system. + |
+
acl + |
+Optional (additional parameter) + |
+The access control policy that can be specified when creating a bucket +The value can be: +
|
+
sc + |
+Optional (additional parameter) + |
+The storage class of the bucket +Different storage classes meet customers' needs for storage performance and costs. +The value can be: +
|
+
location + |
+Mandatory unless the requested OBS region is the default one (additional parameter) + |
+The region where the bucket resides + +
|
+
config + |
+Optional (additional parameter) + |
+The user-defined configuration file for executing the current command. For details about parameters that can be configured, see Configuration Parameters. + |
+
You can use this command to obtain the bucket list. In the list, bucket names are displayed in lexicographical order.
+obsutil ls [-s] [-sc] [-du] [-fs] [-j=1] [-limit=1] [-config=xxx]+
./obsutil ls [-s] [-sc] [-du] [-fs] [-j=1] [-limit=1] [-config=xxx]+
obsutil ls -limit=5 +Start at 2024-09-29 07:58:46.0506904 +0000 UTC + +Bucket CreationDate Location BucketType +obs://bucket001 2018-09-03T01:53:02Z example OBJECT + +obs://bucket002 2018-11-01T01:40:01Z example OBJECT + +obs://bucket003 2018-10-25T11:45:45Z example OBJECT + +obs://bucket004 2018-10-26T02:33:09Z example OBJECT + +obs://bucket005 2018-10-26T02:34:50Z example OBJECT + +Bucket number : 5+
Parameter + |
+Optional or Mandatory + |
+Description + |
+
|---|---|---|
s + |
+Optional (additional parameter) + |
+Displays simplified query result. + NOTE:
+In the simplified format, the returned result contains only the bucket name. + |
+
sc + |
+Optional (additional parameter) + |
+Queries the storage classes of the buckets when listing buckets. + |
+
j + |
+Optional (additional parameter). It must be used together with sc. + |
+The maximum number of concurrent tasks for querying the bucket storage class. The default value is the value of defaultJobs in the configuration file. + NOTE:
+The value is ensured to be greater than or equal to 1. + |
+
du + |
+Optional (additional parameter) + |
+Quickly returns the total size of listed objects, without displaying detailed object information. This parameter can be used together with other parameters. + NOTE:
+This parameter takes effect only on listing objects, but not on listing buckets. + |
+
limit + |
+Optional (additional parameter) + |
+The maximum number of buckets that can be queried. If the value is less than 0, all buckets are listed. If it is left blank, a maximum of 1000 buckets can be listed by default. + |
+
config + |
+Optional (additional parameter) + |
+The user-defined configuration file for executing the current command. For details about parameters that can be configured, see Configuration Parameters. + |
+
In a bucket listing result, BucketType indicates the bucket type. OBJECT indicates an object storage bucket, while POSIX indicates a parallel file system.
+You can use this command to query the basic properties of a bucket, including its default storage class, region, version ID, storage usage, bucket quota, whether it supports POSIX, and the number of objects in the bucket.
+obsutil stat obs://bucket [-acl] [-bf=xxx] [-config=xxx] [-payer=xxx]+
./obsutil stat obs://bucket [-acl] [-bf=xxx] [-config=xxx] + [-payer=xxx]+
obsutil stat obs://bucket-test + +Start at 2024-09-29 07:58:46.0506904 +0000 UTC + +Bucket: + obs://bucket-test +StorageClass: + standard + +ObsVersion: + 3.0 +BucketType: + OBJECTObjectNumber: + 8005 +Size: + 320076506 +Quota: + 0+
Parameter + |
+Optional or Mandatory + |
+Description + |
+
|---|---|---|
bucket + |
+Mandatory + |
+The bucket name + |
+
acl + |
+Optional + |
+Queries the access control policies of the bucket while querying bucket properties. + |
+
bf + |
+Optional (additional parameter) + |
+The display format of the used bucket capacity (in bytes). Possible values are: +
NOTE:
+If this parameter is not configured, the display format of the used bucket capacity (in bytes) is determined by the humanReadableFormat parameter in the configuration file. + |
+
bucket-cname + |
+Optional (additional parameter) + |
+The user-defined domain name bound to the bucket + NOTE:
+This parameter is only supported by obsutil 5.7.9 and later. + |
+
config + |
+Optional (additional parameter) + |
+The user-defined configuration file for executing the current command. For details about parameters that can be configured, see Configuration Parameters. + |
+
payer + |
+Optional (additional parameter) + |
+Specifies that requester pays is enabled. + |
+
Field + |
+Description + |
+
|---|---|
Bucket + |
+The bucket name + |
+
StorageClass + |
+The default storage class of the bucket + |
+
Location + |
+The region where the bucket resides + |
+
ObsVersion + |
+The version of the bucket + |
+
BucketType + |
+The type of the bucket. OBJECT indicates a bucket for object storage. POSIX indicates a bucket used as a parallel file system. + |
+
ObjectNumber + |
+The number of objects in the bucket + |
+
Size + |
+The storage usage of the bucket, in bytes + |
+
Quota + |
+The bucket quota. Value 0 indicates that no upper limit is set for the bucket quota. + |
+
Acl + |
+The access control policy of the bucket + |
+
You can use this command to delete a bucket. The bucket to be deleted must be empty (containing no objects, historical versions, or fragments).
+
To delete a non-empty bucket, run the commands in Deleting a Multipart Upload Task and Deleting an Object to clear the bucket, and then run the following command to delete the bucket.
+obsutil rm obs://bucket [-f] [-config=xxx]+
./obsutil rm obs://bucket [-f] [-config=xxx]+
obsutil rm obs://bucket-test + +Start at 2024-09-30 07:58:33.736622 +0000 UTC + +Do you want to delete bucket [bucket-test] ? Please input (y/n) to confirm: +y +Delete bucket [bucket-test] successfully!+
Parameter + |
+Optional or Mandatory + |
+Description + |
+
|---|---|---|
bucket + |
+Mandatory + |
+The bucket name + |
+
f + |
+Optional (additional parameter) + |
+Runs in force mode. + |
+
config + |
+Optional (additional parameter) + |
+The user-defined configuration file for executing the current command. For details about parameters that can be configured, see Configuration Parameters. + |
+
payer + |
+Optional (additional parameter) + |
+Specifies that requester pays is enabled. + |
+
You can use this command to upload one or more local files or folders to a specified path in OBS. These files can be texts, images, videos, or any other type of files.
+
Do not change the local file or folder when uploading it. Otherwise, the upload may fail or data may be inconsistent.
+obsutil has restrictions on the size of files or folders to be uploaded. You can upload an empty file or folder of 0 bytes. You can also upload a single file or folder with a maximum size of 5 GB in normal mode or a single file with a maximum size of 48.8 TB in multipart mode.
+obsutil cp file_url obs://bucket[/key] [-arcDir=xxx] [-dryRun] [-link] [-u] [-vlength] [-vmd5] [-p=1] [-threshold=5248800] [-acl=xxx] [-sc=xxx] [-meta=aaa:bbb#ccc:ddd] [-ps=auto] [-o=xxx] [-cpd=xxx] [-fr] [-o=xxx] [-config=xxx]+
obsutil cp folder_url obs://bucket[/key] -r [-arcDir=xxx] [-dryRun] [-link] [-f] [-flat] [-u] [-vlength] [-vmd5] [-j=1] [-p=1] [-threshold=52428800] [-acl=xxx] [-sc=xxx] [-meta=aaa:bbb#ccc:ddd] [-ps=auto] [-include=*.xxx] [-exclude=*.xxx] [-timeRange=time1-time2] [-mf] [-o=xxx] [-cpd=xxx] [-config=xxx]+
obsutil cp file1_url,folder1_url|filelist_url obs://bucket[/prefix] -msm=1 [-r] [-arcDir=xxx] [-dryRun] [-link] [-f] [-u] [-vlength] [-vmd5] [-flat] [-j=1] [-p=1] [-threshold=52428800] [-acl=xxx] [-sc=xxx] [-meta=aaa:bbb#ccc:ddd] [-ps=auto] [-include=*.xxx] [-exclude=*.xxx][-timeRange=time1-time2] [-at] [-mf] [-o=xxx] [-cpd=xxx] [-config=xxx]+ +
./obsutil cp file_url obs://bucket[/key] [-arcDir=xxx] [-dryRun] [-link] [-u] [-vlength] [-vmd5] [-p=1] [-threshold=5248800] [-acl=xxx] [-sc=xxx] [-meta=aaa:bbb#ccc:ddd] [-ps=auto] [-o=xxx] [-cpd=xxx] [-fr] [-o=xxx] [-config=xxx]+
./obsutil cp folder_url obs://bucket[/key] -r [-arcDir=xxx] [-dryRun] [-link] [-f] [-flat] [-u] [-vlength] [-vmd5] [-j=1] [-p=1] [-threshold=52428800] [-acl=xxx] [-sc=xxx] [-meta=aaa:bbb#ccc:ddd] [-ps=auto] [-include=*.xxx] [-exclude=*.xxx] [-timeRange=time1-time2] [-at] [-mf] [-o=xxx] [-cpd=xxx] [-config=xxx]+
./obsutil cp file1_url,folder1_url|filelist_url obs://bucket[/prefix] -msm=1 [-r] [-arcDir=xxx] [-dryRun] [-link] [-f] [-u] [-vlength] [-vmd5] [-flat] [-j=1] [-p=1] [-threshold=52428800] [-acl=xxx] [-sc=xxx] [-meta=aaa:bbb#ccc:ddd] [-ps=auto] [-include=*.xxx] [-exclude=*.xxx][-timeRange=time1-time2] [-mf] [-o=xxx] [-cpd=xxx] [-config=xxx]+ +
obsutil cp d:\temp\test.txt obs://bucket-test/key +Start at 2024-09-30 08:11:41.6724827 +0000 UTC + +Parallel: 5 Jobs: 5 +Threshold: 50.00MB PartSize: auto +VerifyLength: false VerifyMd5: false +CheckpointDir: C:\Users\Administrator\.obsutil_checkpoint + +[====================================================] 100.00% 1.68 MB/s 8.46MB/8.46MB 5s +Upload successfully, 8.46MB, n/a, d:\temp\test.txt --> obs://bucket-test/key, cost [5], status [200], request id [0000016979E1D2B2860BB5181229C72C]+
obsutil cp d:\temp obs://bucket-test -f -r +Start at 2024-09-30 08:14:12.1406275 +0000 UTC + +Parallel: 5 Jobs: 5 +Threshold: 50.00MB PartSize: auto +VerifyLength: false VerifyMd5: false +CheckpointDir: C:\Users\Administrator\.obsutil_checkpoint + +Task id: 104786c8-27c2-48fc-bc6a-5886596fb0ed +OutputDir: C:\Users\Administrator\.obsutil_output + +[========================================================] 100.00% tps:35.71 2.02 KB/s 7.20MB/7.20MB 0s +Succeed count: 5 Failed count: 0 +Succeed bytes: xxx +Metrics [max cost:90 ms, min cost:45 ms, average cost:63.80 ms, average tps:35.71, transferred size: 7.20MB] + +Task id: 104786c8-27c2-48fc-bc6a-5886596fb0ed+
Parameter + |
+Optional or Mandatory + |
+Description + |
+
|---|---|---|
file_url + |
+Optional for uploading multiple files/folders +Mandatory for uploading a file + |
+The local file path +
|
+
folder_url + |
+Optional for uploading multiple files/folders +Mandatory for uploading a folder + |
+The local folder path +
|
+
filelist_url + |
+Optional for uploading multiple files/folders + |
+The path of the file that contains the list of files/folders to be uploaded. If this parameter is configured, msm must be set to 2. + + |
+
bucket + |
+Mandatory + |
+The name of the bucket where you will upload the file or folder + |
+
key + |
+Optional + |
+The object name or object name prefix specified when uploading a file, or the object name prefix specified when uploading a folder +When uploading a file or folder, the upload path and name change depending on the value of this parameter. The specific rules are as follows: +
NOTE:
+For details about how to use this parameter, see Upload. + |
+
fr + |
+Optional for uploading a file (additional parameter) + |
+Generates an operation result file when uploading a file. + |
+
flat + |
+Optional for uploading a folder or multiple files/folders (additional parameter) + |
+Uploads all files in a folder but not the folder itself. + |
+
arcDir + |
+Optional (additional parameter) + |
+The path to which the uploaded files are archived + |
+
dryRun + |
+Optional (additional parameter) + |
+Conducts a dry run. + |
+
link + |
+Optional (additional parameter) + |
+The actual path of a symbolic link for a file or folder +
|
+
u + |
+Optional (additional parameter) + |
+Indicates incremental upload. +If this parameter is set, each file can be uploaded only when it does not exist in the bucket, its size is different from the namesake one in the bucket, or it has the latest modification time. + |
+
vlength + |
+Optional (additional parameter) + |
+After the upload completes, checks whether the sizes of the objects in the bucket are the same as those of the local files. + |
+
vmd5 + |
+Optional (additional parameter) + |
+After the upload completes, checks whether the MD5 values of the objects in the bucket are the same as those of the local files. +
|
+
p + |
+Optional (additional parameter) + |
+The maximum number of concurrent uploads for a multipart upload +The default value is the value of defaultParallels in the configuration file. + |
+
threshold + |
+Optional (additional parameter) + |
+The threshold for enabling multipart upload. If the size of the file or folder to be uploaded is smaller than the threshold, upload it directly. Otherwise, a multipart upload is required. +The default value is the value of defaultBigfileThreshold in the configuration file. +Unit: byte +This parameter value can contain a unit, for example, 1MB (indicating 1,048,576 bytes). + NOTE:
+If you upload a file or folder directly, no part record is generated, and resumable transmission is not supported. + |
+
acl + |
+Optional (additional parameter) + |
+The access control policies that can be specified for objects when uploading files. +Possible values are: +
|
+
sc + |
+Optional (additional parameter) + |
+The storage classes of objects that can be specified when uploading files +Possible values are: +
|
+
meta + |
+Optional (additional parameter) + |
+The standard or user-defined metadata that can be specified during file upload +
|
+
ps + |
+Optional (additional parameter) + |
+The size of each part in a multipart upload task +
|
+
cpd + |
+Optional (additional parameter) + |
+The folder where the part records reside. The default value is .obsutil_checkpoint, the subfolder in the home directory of the user who executes obsutil commands. +A part record is generated during a multipart upload and saved to the upload subfolder. After the upload succeeds, its part record is deleted automatically. If the upload fails or is suspended, the system attempts to resume the task according to its part record when you perform the upload the next time. + |
+
r + |
+Mandatory for uploading a folder (additional parameter) +Optional for uploading multiple files/folders + |
+Recursively uploads all files and subfolders within a folder. + |
+
f + |
+Optional for uploading a folder or multiple files/folders (additional parameter) + |
+Runs in force mode. + |
+
j + |
+Optional for uploading a folder or multiple files/folders (additional parameter) + |
+The maximum number of concurrent tasks for uploading a folder. The default value is the value of defaultJobs in the configuration file. + NOTE:
+The value is ensured to be greater than or equal to 1. + |
+
msm + |
+Mandatory for uploading multiple files/folders (additional parameter) + |
+Enables the mode for uploading multiple files/folders. Possible values are 1 and 2. +
|
+
exclude + |
+Optional for uploading a folder or multiple files/folders (additional parameter) + |
+The file matching patterns that are excluded. After this parameter is specified, if the name of the file to be uploaded matches the value of this parameter, the file is skipped. For example, if this parameter is set to *.txt, all files whose names end with .txt are skipped and not uploaded. +
Restrictions: +The matching pattern takes effect only for files in the folder. + NOTE:
+
|
+
include + |
+Optional for uploading a folder or multiple files/folders (additional parameter) + |
+The file matching patterns that are included. After this parameter is specified, if the name of the file to be uploaded matches the value of this parameter, the file is uploaded. For example, if this parameter is set to *.txt, all files whose names end with .txt are uploaded. +
Restrictions: +
Example: +./obsutil cp /localpath/ obs://test/ -include=/localpath/2022-12-09/* -f -r+ This command uploads files that are under localpath and start with /localpath/2022-12-09/ to bucket test. + NOTE:
+
|
+
at + |
+Optional for uploading a folder or multiple files/folders (additional parameter) + |
+Indicates that only the files whose latest access time is within the value of timeRange are uploaded. +This parameter must be used together with timeRange. + |
+
disableDirObject + |
+Optional for uploading multiple folders (additional parameter) + |
+Indicates the folders themselves are not uploaded as an object. Configuring this parameter can avoid uploading empty folders to a bucket. If a folder contains files, the files will be uploaded and the original path format is retained. + |
+
timeRange + |
+Optional for uploading a folder or multiple files/folders (additional parameter) + |
+The time range matching pattern when uploading files. Only files whose latest modification time is within the configured time range are uploaded. +This pattern has a lower priority than the file matching patterns (exclude/include). That is, the time range matching pattern is executed after the configured file matching patterns. +
|
+
mf + |
+Optional (additional parameter) + |
+Indicates that the name matching pattern (include or exclude) and the time matching pattern (timeRange) also take effect on folders. + |
+
o + |
+Optional (additional parameter) + |
+The folder that stores the result files. After the command is executed, result files (possibly success, failure, and warning files) will be created in the specified folder. +The default value is .obsutil_output, a subfolder in the user's home directory where obsutil commands are executed. +
|
+
bucket-cname + |
+Optional (additional parameter) + |
+The user-defined domain name bound to the bucket + NOTE:
+This parameter is only supported by obsutil 5.7.9 and later. + |
+
config + |
+Optional (additional parameter) + |
+The user-defined configuration file for executing the current command. For details about parameters that can be configured, see Configuration Parameters. + |
+
payer + |
+Optional (additional parameter) + |
+Specifies that requester pays is enabled. + |
+
Field + |
+Description + |
+
|---|---|
Parallel + |
+The parameter -p in the request + |
+
Jobs + |
+The parameter -j in the request + |
+
Threshold + |
+The parameter -threshold in the request + |
+
PartSize + |
+The parameter -ps in the request + |
+
Exclude + |
+The parameter -exclude in the request + |
+
Include + |
+The parameter -include in the request + |
+
TimeRange + |
+The parameter -timeRange in the request + |
+
VerifyLength + |
+The parameter -vlength in the request + |
+
VerifyMd5 + |
+The parameter -vmd5 in the request + |
+
CheckpointDir + |
+The parameter -cpd in the request + |
+
OutputDir + |
+The parameter -o in the request + |
+
ArcDir + |
+The parameter -arcDir in the request + |
+
Succeed count + |
+The number of successful tasks + |
+
Failed count + |
+The number of failed tasks + |
+
Skip count + |
+The number of tasks that are skipped during incremental upload, download, or copy, and synchronous upload, download, or copy. + NOTE:
+Skipped tasks are recorded into successful tasks. + |
+
Warning count + |
+The number of tasks that are executed successfully but contain warnings. + NOTE:
+
|
+
Succeed bytes + |
+The number of bytes that are successfully uploaded or downloaded. + |
+
max cost + |
+The maximum duration of all tasks, in ms + |
+
min cost + |
+The minimum duration of all tasks, in ms + |
+
average cost + |
+The average duration of all tasks, in ms + |
+
average tps + |
+The average number of tasks completed per second + |
+
Task id + |
+The unique ID of an operation, which is used to search for the result file generated for a batch task + |
+
You can use this command to query objects or object versions in a bucket. All objects are listed in lexicographical order by object name and version ID.
+obsutil ls obs://bucket[/prefix] [-s] [-d][-fs] [-v] [-du] [-marker=xxx] [-versionIdMarker=xxx] [-bf=xxx] [-limit=1] [-config=xxx]+
./obsutil ls obs://bucket[/prefix] [-s][-fs] [-d] [-v] [-du] [-marker=xxx] [-versionIdMarker=xxx] [-bf=xxx] [-limit=1] [-config=xxx]+
obsutil ls obs://bucket-test -limit=10 +Start at 2024-09-30 08:18:50.0592788 +0000 UTC + +Listing objects . + +Folder list: +obs://bucket-test/api/ + +Object list: +key LastModified Size StorageClass ETag +obs://bucket-test/AUTHORS 2018-11-16T02:15:49Z 33243 standard "796393c1eaf502ef56a85c2ceb640aea" + +obs://bucket-test/CONTRIBUTING.md 2018-11-16T02:15:49Z 1366 standard "12d93325ba6131f852daecd18dd65edc" + +obs://bucket-test/CONTRIBUTORS 2018-11-16T02:15:49Z 45710 standard "b486b5003e6215c9199e86ab3ccec9fa" + +obs://bucket-test/LICENSE 2018-11-16T02:15:49Z 1479 standard "5d4950ecb7b26d2c5e4e7b4e0dd74707" + +obs://bucket-test/PATENTS 2018-11-16T02:15:49Z 1303 standard "3a55d95595a6f9e37dee53826b4daff2" + +obs://bucket-test/README.md 2018-11-16T02:15:49Z 1399 standard "97351fd7946b9ea021a31a86ba2a10ab" + +obs://bucket-test/VERSION 2018-11-16T02:15:49Z 7 standard "43d93b553855b0e1fc67e31c28c07b65" + +obs://bucket-test/api/README 2018-11-16T02:15:49Z 521 standard "4e9e63a87075df60cdf65c8ce9e92117" + +obs://bucket-test/api/except.txt 2018-11-16T02:15:49Z 20194 standard "8eb96de3f60447e2f09a7531c99fb3ee" + +Next marker: api/except.txt +Folder number: 1 +File number: 9+
obsutil ls obs://bucket-test2 +Start at 2024-09-30 08:21:06.6300221 +0000 UTC + +Listing objects . + +Object list: +key LastModified Size StorageClass ETag +obs://bucket-test2/123 2022-03-29T09:17:51Z 0B standard "d41d8cd98f00b204e9800998ecf8427e" + +obs://bucket-test2/1_2-3.txt 2022-03-29T09:17:51Z 0B standard "d41d8cd98f00b204e9800998ecf8427e" + +obs://bucket-test2/1_2-3_33.txt 2022-03-29T09:17:51Z 200B standard "dcf204c11d791255adc63e61763c2426" + +obs://bucket-test2/New text file.txt + 2022-03-29T09:17:51Z 0B standard "d41d8cd98f00b204e9800998ecf8427e" + +Total size of bucket: 200B +Folder number: 0 +File number: 4+
obsutil ls obs://bucket-test2/prefix +Start at 2024-09-30 08:24:36.7057148 +0000 UTC + +Listing objects . + +Object list: +key LastModified Size StorageClass ETag +obs://bucket-test2/prefix 2022-03-29T09:17:51Z 0B standard "d41d8cd98f00b204e9800998ecf8427e" + +obs://bucket-test2/prefix2 2022-03-29T09:17:51Z 0B standard "d41d8cd98f00b204e9800998ecf8427e" + +Total size of prefix [prefix]:: 0B +Folder number: 0 +File number: 2+
Parameter + |
+Optional or Mandatory + |
+Description + |
+
|---|---|---|
bucket + |
+Mandatory + |
+The bucket name + |
+
prefix + |
+Optional + |
+The prefix of the object name for listing objects + NOTE:
+If this parameter is left blank, all objects in the bucket are listed. + |
+
s + |
+Optional (additional parameter) + |
+Displays simplified query result. + NOTE:
+In the simplified format, the returned result contains only the object name. + |
+
d + |
+Optional (additional parameter) + |
+Lists only objects and subdirectories in the current directory, instead of recursively listing all objects and subdirectories. +In big data scenarios, parallel file systems usually have deep directory levels and each directory has a large number of files. In such case, you are advised to use this parameter to limit the scope to list. + NOTE:
+According to the naming conventions in OBS, a slash (/) is used as the directory separator. + |
+
v + |
+Optional (additional parameter) + |
+Lists versions of an object in a bucket. The result contains the latest version and historical versions (if any) of the object. + |
+
marker + |
+Optional (additional parameter) + |
+The start position for listing objects in a bucket. The objects following this start position are sorted in lexicographical order by object name. + NOTE:
+For details about how to use this parameter, see Listing. + |
+
versionIdMarker + |
+Optional (additional parameter). It must be used together with the v and marker parameters. + |
+The start position for listing object versions in a bucket. The object versions following this start position are sorted in lexicographical order by object name. + NOTE:
+If the value of versionIdMarker is not a version ID specified by marker, versionIdMarker is invalid. + |
+
bf + |
+Optional (additional parameter) + |
+The display formats of bytes in the listing result. Possible values are: +
NOTE:
+If this parameter is not configured, the display format of bytes in the result is determined by the humanReadableFormat parameter in the configuration file. + |
+
du + |
+Optional (additional parameter) + |
+Quickly returns the total size of listed objects, without displaying detailed object information. This parameter can be used together with other parameters. + NOTE:
+If there are too many objects listed, wait for a while. + CAUTION:
+
|
+
limit + |
+Optional (additional parameter) + |
+The maximum number of objects that can be listed. If the value is less than or equal to 0, all objects are listed. If it is left blank, 1,000 objects are listed by default. + NOTE:
+If there are a large number of objects in a bucket, you are advised to set this parameter to limit the number of objects to be listed each time. If not all objects are listed, marker and versionIdMarker of the next request will be returned in the result, which you can use to list the remaining objects. + |
+
bucket-cname + |
+Optional (additional parameter) + |
+The user-defined domain name bound to the bucket + NOTE:
+This parameter is only supported by obsutil 5.7.9 and later. + |
+
config + |
+Optional (additional parameter) + |
+The user-defined configuration file for executing the current command. For details about parameters that can be configured, see Configuration Parameters. + |
+
payer + |
+Optional (additional parameter) + |
+Specifies that requester pays is enabled. + |
+
Field + |
+Description + |
+
|---|---|
Key + |
+The object name + |
+
LastModified + |
+The time when the last modification was made to the object + |
+
Size + |
+The object size + |
+
StorageClass + |
+The storage class of an object. Possible values are: +
|
+
ETag + |
+The ETag of an object, which is a Base64-encoded 128-bit MD5 digest. ETag is the unique identifier of the object content. It can be used to determine whether the object content is changed. For example, if the ETag value is A when an object is uploaded, but this value has changed to B when the object is downloaded, it indicates that the object content has been changed. The ETag reflects changes to the object content, rather than the object metadata. An uploaded object or copied object has a unique ETag. + |
+
You can use this command to query the basic properties of an object.
+obsutil stat obs://bucket/key [-acl][-bf=xxx] [-config=xxx]+
./obsutil stat obs://bucket/key [-acl][-bf=xxx] [-config=xxx]+
obsutil stat obs://bucket-test/key + +Start at 2024-09-25 04:48:10.1147483 +0000 UTC + +Key: + obs://bucket-test/key +LastModified: + 2018-11-16T02:15:49Z +Size: + 7 +StorageClass: + standard +ETag: + 43d93b553855b0e1fc67e31c28c07b65 +ContentType: + text/plain +Type: + file +Metadata: + key=value+
Parameter + |
+Optional or Mandatory + |
+Description + |
+
|---|---|---|
bucket + |
+Mandatory + |
+The name of the bucket to which an object belongs + |
+
key + |
+Mandatory + |
+The name of the object whose attributes are to be queried + |
+
acl + |
+Optional + |
+Queries the access control policies of the object at the same time. + |
+
bf + |
+Optional (additional parameter) + |
+The display format of the object size (in bytes). Possible values are: +
For common users, the human-readable format is easier to understand. For scenarios where accurate calculation or automatic processing is required, the raw format is more suitable. +If this parameter is not configured, the display format of the object size (in bytes) is determined by the humanReadableFormat parameter in the configuration file. + |
+
bucket-cname + |
+Optional (additional parameter) + |
+The user-defined domain name bound to the bucket + NOTE:
+This parameter is only supported by obsutil 5.7.9 and later. + |
+
config + |
+Optional (additional parameter) + |
+The user-defined configuration file for executing the current command. For details about parameters that can be configured, see Configuration Parameters. + |
+
payer + |
+Optional (additional parameter) + |
+Specifies that requester pays is enabled. + |
+
Field + |
+Description + |
+
|---|---|
Key + |
+The object name + |
+
LastModified + |
+The latest modification time of the object + |
+
Size + |
+The object size +Unit: byte + |
+
StorageClass + |
+The storage class of the object +Possible values are: +
|
+
MD5 + |
+Real MD5 of the object. This parameter is used to ensure and verify data integrity. +You can query this value only after running the cp command and configuring the -vmd5 parameter. + |
+
ETag + |
+The ETag value of an object calculated on the server + |
+
ContentType + |
+The file type of an object. It determines the format and encoding method a browser will use to read the file. + |
+
Type + |
+The file type + |
+
Metadata + |
+The user-defined metadata of the object. This field can be queried only when the object has user-defined metadata. + |
+
You can use this command to restore a specified cold object or restore cold objects with a specific prefix in batches.
+
obsutil restore obs://bucket/key [-d=1] [-t=xxx] [-versionId=xxx] [-fr] [-o=xxx] [-config=xxx]+
obsutil restore obs://bucket[/key] -r [-f] [-v] [-d=1] [-t=xxx] [-o=xxx] [-j=1] [-config=xxx]+
obsutil restore obs://bucket/folder/ -r [-f] [-v] [-d=1] [-t=xxx] [-o=xxx] [-j=1] [-config=xxx]+
./obsutil restore obs://bucket/key [-d=1] [-t=xxx] [-versionId=xxx] [-fr] [-o=xxx] [-config=xxx]+
./obsutil restore obs://bucket[/key] -r [-f] [-v] [-d=1] [-t=xxx] [-o=xxx] [-j=1] [-config=xxx]+
./obsutil restore obs://bucket/folder/ -r [-f] [-v] [-d=1] [-t=xxx] [-o=xxx] [-j=1] [-config=xxx]+
obsutil restore obs://bucket-test/key +Start at 2024-09-30 08:56:17.9537365 +0000 UTC + +Start to restore object [key] in the bucket [bucket-test] successfully, cost [252] ms, request id [0000019242250F754015F23EE0B7876E]+
obsutil restore obs://bucket-test -r -f +Start at 2024-09-30 08:57:11.3565648 +0000 UTC + +[================================================] 100.00% 3s +Succeed count: 12 Failed count: 0 +Metrics [max cost:264 ms, min cost:54 ms, average cost:119.33 ms, average tps:19.70] +Task id: 96f104ee-d0bf-40ff-95dd-31dec0d8f4f4+
Parameter + |
+Optional or Mandatory + |
+Description + |
+
|---|---|---|
bucket + |
+Mandatory + |
+The bucket name + |
+
key + |
+Mandatory for restoring a single object whose storage class is cold +Optional for batch restoring objects whose storage class is cold + |
+The name of the object to be restored or the name prefix of the objects to be restored in batches + NOTE:
+If this parameter is left blank when batch restoring objects, all objects whose storage class is cold in the bucket are restored. + |
+
d + |
+Optional (additional parameter) + |
+The storage duration after objects whose storage class is cold are restored, in days. The value ranges from 1 to 30. The default value is 1. + |
+
t + |
+Optional (additional parameter) + |
+The options for restoring objects. Possible values are: +
NOTE:
+
|
+
versionId + |
+Optional for restoring a single object whose storage class is cold (additional parameter) + |
+The version ID of the to-be-restored object whose storage class is cold + |
+
fr + |
+Optional for restoring a single object whose storage class is cold (additional parameter) + |
+Generates an operation result file when restoring a single object whose storage class is cold. + |
+
f + |
+Optional for batch restoring objects whose storage class is cold (additional parameter) + |
+Runs in force mode. + |
+
r + |
+Mandatory for batch restoring objects whose storage class is cold (additional parameter) + |
+Restores objects whose storage class is cold in batches by object name prefix. + |
+
v + |
+Optional for batch restoring objects whose storage class is cold (additional parameter) + |
+Restores versions of objects whose storage class is cold in batches by object name prefix. + |
+
o + |
+Optional (additional parameter) + |
+The folder that stores the result files. After the command is executed, result files (possibly success and failure files) will be created in the specified folder. The default value is .obsutil_output, a subfolder in the user's home directory where obsutil commands are executed. + NOTE:
+
|
+
j + |
+Optional for batch restoring objects whose storage class is cold (additional parameter) + |
+The maximum number of concurrent tasks for batch restoring objects whose storage class is cold. The default value is the value of defaultJobs in the configuration file. + NOTE:
+The value is ensured to be greater than or equal to 1. + |
+
config + |
+Optional (additional parameter) + |
+The user-defined configuration file for executing the current command. For details about parameters that can be configured, see Configuration Parameters. + |
+
payer + |
+Optional (additional parameter) + |
+Specifies that requester pays is enabled. + |
+
Refer to Response for uploading an object.
+You can use this command to copy a single object or copy objects in batches by a specified object name prefix.
+
obsutil cp obs://srcbucket/key obs://dstbucket/[dest] [-dryRun][-u] [-crr] [-vlength] [-vmd5] [-p=1] [-threshold=52428800] [-versionId=xxx] [-acl=xxx] [-sc=xxx] [-meta=aaa:bbb#ccc:ddd] [-ps=auto] [-cpd=xxx] [-fr] [-o=xxx] [-config=xxx]+
obsutil cp obs://srcbucket[/key] obs://dstbucket[/dest] -r [-dryRun][-f] [-flat] [-u] [-crr] [-vlength] [-vmd5] [-j=1] [-p=1] [-threshold=52428800] [-acl=xxx] [-sc=xxx] [-meta=aaa:bbb#ccc:ddd] [-ps=auto] [-include=*.xxx] [-exclude=*.xxx] [-timeRange=time1-time2] [-mf] [-o=xxx] [-cpd=xxx] [-config=xxx]+
./obsutil cp obs://srcbucket/key obs://dstbucket/[dest] [-dryRun] [-u] [-crr] [-vlength] [-vmd5] [-p=1] [-threshold=52428800] [-versionId=xxx] [-acl=xxx] [-sc=xxx] [-meta=aaa:bbb#ccc:ddd] [-ps=auto] [-cpd=xxx] [-fr] [-o=xxx] [-config=xxx]+
./obsutil cp obs://srcbucket[/key] obs://dstbucket[/dest] -r [-dryRun] [-f] [-flat] [-u] [-crr] [-vlength] [-vmd5] [-j=1] [-p=1] [-threshold=52428800] [-acl=xxx] [-sc=xxx] [-meta=aaa:bbb#ccc:ddd] [-ps=auto] [-include=*.xxx] [-exclude=*.xxx] [-timeRange=time1-time2] [-mf] [-o=xxx] [-cpd=xxx] [-config=xxx]+
obsutil cp obs://bucket-test/key obs://bucket-test2 +Start at 2024-09-30 08:30:09.0815415 +0000 UTC + +Parallel: 3 Jobs: 3 +Threshold: 50.00MB PartSize: auto +CheckpointDir: xxxx + +[=====================================================] 100.00% 6/s 0s +Waiting for the copied key to be completed on server side. +Copy successfully, 19B, obs://bucket-test/key --> obs://bucket-test2/key +ext.txt, cost [1708], status [200], request id [00000192420D227E4017336A12F1DC22]+
obsutil cp obs://bucket-test/temp/ obs://bucket-test2 -r -f +Start at 2024-09-30 08:34:02.7819703 +0000 UTC + +Parallel: 5 Jobs: 5 +Threshold: 50.00MB PartSize: auto +CheckpointDir: xxxx + +Task id: 0476929d-9d23-4dc5-b2f8-0a0493f027c5 +OutputDir: xxxx + +[=============================================================] 100.00% 10/s 0s +Succeed count: 5 Failed count: 0 +Metrics [max cost:298 ms, min cost:192 ms, average cost:238.00 ms, average tps:9.71, transferred size: 7.20MB] +Task id: 0476929d-9d23-4dc5-b2f8-0a0493f027c5+
Parameter + |
+Optional or Mandatory + |
+Description + |
+
|---|---|---|
srcbucket + |
+Mandatory + |
+The source bucket name + |
+
dstbucket + |
+Mandatory + |
+The destination bucket name + |
+
dest + |
+Optional + |
+The destination object name when copying an object, or the name prefix of destination objects when copying objects in batches + |
+
key + |
+Mandatory for copying an object. +Optional for copying objects in batches. + |
+The source object name when copying an object, or the name prefix of source objects when copying objects in batches +The rules are as follows: +
NOTE:
+For details about how to use this parameter, see Copy. + |
+
fr + |
+Optional for copying an object (additional parameter) + |
+Generates an operation result file when copying an object. + |
+
flat + |
+Optional for copying objects in batches (additional parameter) + |
+The name prefix of the parent object is excluded when copying objects in batches. + |
+
dryRun + |
+Optional (additional parameter) + |
+Conducts a dry run. + |
+
crr + |
+Optional (additional parameter) + |
+Enables the client-side cross-region replication function. In this mode, data is directly copied to the destination bucket from the source bucket through data stream. The buckets can be any two OBS buckets. +
NOTE:
+The configurations of the source bucket and destination bucket are respectively akCrr/skCrr/tokenCrr/endpointCrr and ak/sk/token/endpoint in the configuration file. + |
+
vlength + |
+Optional (additional parameter) + |
+Verifies whether the object size in the destination bucket is the same as that in the source bucket after the copy task completes. +This parameter must be used together with crr. + |
+
vmd5 + |
+Optional (additional parameter) + |
+Verifies whether the MD5 value of the destination bucket is the same as that of the source bucket after the copy task completes. +
|
+
u + |
+Optional (additional parameter) + |
+Indicates incremental copy. If this parameter is set, each object can be copied only when it does not exist in the destination bucket, its size is different from the namesake one in the destination bucket, or it has the latest modification time. + |
+
p + |
+Optional (additional parameter) + |
+The maximum number of concurrent multipart copy tasks when copying an object. The default value is the value of defaultParallels in the configuration file. + CAUTION:
+For an inter-bucket replication task that does not include the crr parameter, the maximum allowable value for this parameter is 10,000. + |
+
threshold + |
+Optional (additional parameter) + |
+The threshold for enabling multipart copy. If the size of the object to be copied is smaller than the threshold, copy the object directly. If not, a multipart copy is required. +The default value is the value of defaultBigfileThreshold in the configuration file. +Unit: byte +This parameter value can contain a unit, for example, 1MB (indicating 1,048,576 bytes). + NOTE:
+If you copy an object directly, no part record is generated, and resumable transmission is not supported. + |
+
versionId + |
+Optional for copying an object (additional parameter) + |
+The source object version ID that can be specified when copying an object + |
+
acl + |
+Optional (additional parameter) + |
+The access control policies for destination objects that can be specified when copying objects +Possible values are: +
|
+
sc + |
+Optional (additional parameter) + |
+The storage classes of the destination objects that can be specified when copying objects +Possible values are: +
|
+
meta + |
+Optional (additional parameter) + |
+The standard or user-defined metadata that can be specified during object replication. +
|
+
ps + |
+Optional (additional parameter) + |
+The size of each part in a multipart copy task +
|
+
cpd + |
+Optional (additional parameter) + |
+The folder where the part records reside. The default value is .obsutil_checkpoint, the subfolder in the home directory of the user who executes obsutil commands. +A part record is generated during a multipart copy and saved to the upload subfolder. After the copy succeeds, its part record is deleted automatically. If the copy fails or is suspended, the system attempts to resume the task according to its part record when you perform the copy the next time. + |
+
r + |
+Mandatory for copying objects in batches (additional parameter) + |
+Copies objects in batches based on a specified name prefix of objects in the source bucket. + |
+
f + |
+Optional for copying objects in batches (additional parameter) + |
+Runs in force mode. + |
+
j + |
+Optional for copying objects in batches (additional parameter) + |
+The maximum number of concurrent tasks for copying objects in batches. The default value is the value of defaultJobs in the configuration file. + CAUTION:
+For an inter-bucket replication task that does not include the crr parameter, the maximum allowable value for this parameter is 10,000. + NOTE:
+The value is ensured to be greater than or equal to 1. + |
+
exclude + |
+Optional for copying objects in batches (additional parameter) + |
+The matching patterns of source objects that are excluded. After this parameter is specified, if the name of the object to be copied matches the value of this parameter, the object is skipped. For example, if this parameter is set to *.txt, all files whose names end with .txt are skipped and not copied. +
Restrictions: +This matching pattern applies only to objects whose names do not end with a slash (/). + NOTE:
+
|
+
include + |
+Optional for copying objects in batches (additional parameter) + |
+The included matching patterns of source objects. After this parameter is specified, if the name of the object to be copied matches the value of this parameter, the object is copied. For example, if this parameter is set to *.txt, all objects whose names end with .txt are copied. +
Restrictions: +
Example: +./obsutil cp obs://src-bucket/ obs://target-bucket/ -include=/src-object/* -f -r+ This command copies files whose names start with src-object/ from the src-bucket bucket to the target-bucket bucket. + NOTE:
+
|
+
timeRange + |
+Optional for copying objects in batches (additional parameter) + |
+The time range matching pattern when copying objects. Only objects whose latest modification time is within the configured time range are copied. +This pattern has a lower priority than the file matching patterns (exclude/include). That is, the time range matching pattern is executed after the configured file matching patterns. +
This matching pattern applies only to objects whose names do not end with a slash (/). + |
+
mf + |
+Optional (additional parameter) + |
+Indicates that the name matching pattern (include or exclude) and the time matching pattern (timeRange) also take effect on objects whose names end with a slash (/). + |
+
o + |
+Optional (additional parameter) + |
+The folder that stores the result files. After the command is executed, result files (possibly success, failure, and warning files) will be created in the specified folder. +The default value is .obsutil_output, a subfolder in the user's home directory where obsutil commands are executed. +
|
+
bucket-cname + |
+Optional (additional parameter) + |
+The user-defined domain name bound to the bucket + NOTE:
+This parameter is only supported by obsutil 5.7.9 and later. + |
+
config + |
+Optional (additional parameter) + |
+The user-defined configuration file for executing the current command. For details about parameters that can be configured, see Configuration Parameters. + |
+
payer + |
+Optional (additional parameter) + |
+Specifies that requester pays is enabled. + |
+
Refer to Response for uploading an object.
+You can use this command to download an object or download objects in batches by object name prefix to your local PC.
+
obsutil cp obs://bucket/key file_or_folder_url [-tempFileDir=xxx] [-dryRun] [-u] [-vlength] [-vmd5] [-p=1] [-threshold=52428800] [-versionId=xxx] [-ps=auto] [-cpd=xxx][-fr] [-o=xxx] [-config=xxx]+
obsutil cp obs://bucket[/key] folder_url -r [-tempFileDir=xxx] [-dryRun] [-f] [-flat] [-u] [-vlength] [-vmd5] [-j=1] [-p=1] [-threshold=52428800] [-ps=auto] [-include=*.xxx] [-exclude=*.xxx] [-timeRange=time1-time2] [-mf] [-o=xxx] [-cpd=xxx] [-config=xxx]+
./obsutil cp obs://bucket/key file_or_folder_url [-tempFileDir=xxx] [-dryRun] [-u] [-vlength] [-vmd5] [-p=1] [-threshold=52428800] [-versionId=xxx] [-ps=auto] [-cpd=xxx] [-fr] [-o=xxx] [-config=xxx]+
./obsutil cp obs://bucket[/key] folder_url -r [-tempFileDir=xxx] [-dryRun] [-f] [-flat] [-u] [-vlength] [-vmd5] [-j=1] [-p=1] [-threshold=52428800] [-ps=auto] [-include=*.xxx] [-exclude=*.xxx] [-timeRange=time1-time2] [-mf] [-o=xxx] [-cpd=xxx] [-config=xxx]+
obsutil cp obs://bucket-test/key d:\temp\test.txt +Start at 2024-09-30 08:39:34.180766 +0000 UTC + +Parallel: 5 Jobs: 5 +Threshold: 50.00MB PartSize: auto +VerifyLength: false VerifyMd5: false +CheckpointDir: xxxx +TempFileDir: xxxx + +[==========================================] 100.00% 4.86 KB/s 8.46MB/8.46MB 0s +Download successfully, 8.46MB, obs://bucket-test/key --> d:\temp\test.txtt, cost [41], status [200], request id [000001924215BEC84019EDF4044A5451]+
obsutil cp obs://bucket-test/temp d:\ -f -r +Start at 2024-09-30 08:41:56.0306522 +0000 UTC + +Parallel: 5 Jobs: 5 +Threshold: 50.00MB PartSize: auto +VerifyLength: false VerifyMd5: false +CheckpointDir: xxxx + +Task id: 3066a4b0-4d21-4929-bb84-4829c32cbd0f +OutputDir: xxxx +TempFileDir: xxxx + +[======================================================] 100.00% tps:17.86 155.59 KB/s 7.20MB/7.20MB 0s +Succeed count: 6 Failed count: 0 +Succeed bytes: 70B +Metrics [max cost:153 ms, min cost:129 ms, average cost:92.00 ms, average tps:70, transferred size: 7.20MB] + +Task id: 3066a4b0-4d21-4929-bb84-4829c32cbd0f+
Parameter + |
+Optional or Mandatory + |
+Description + |
+
|---|---|---|
file_or_folder_url + |
+Mandatory for downloading an object + |
+The local file/folder path + |
+
folder_url + |
+Mandatory for downloading objects in batches + |
+The local folder path + |
+
bucket + |
+Mandatory + |
+The bucket name + |
+
key + |
+Mandatory for downloading an object +Optional for downloading objects in a batch + |
+The name of the object to be downloaded, or the name prefix of the objects to be downloaded in batches +This parameter cannot be left blank when downloading an object. The saving and naming rules are as follows: +
During batch download, the saving rules are as follows: +
NOTE:
+
|
+
fr + |
+Optional for downloading an object (additional parameter) + |
+Generates an operation result file when downloading an object. + |
+
flat + |
+Optional for downloading objects in batches (additional parameter) + |
+The name prefix of the parent object is excluded when downloading objects in batches. + |
+
tempFileDir + |
+Optional (additional parameter) + |
+The directory for storing temporary files during multipart download. The default value is the value of defaultTempFileDir in the configuration file. + NOTE:
+
|
+
dryRun + |
+Optional (additional parameter) + |
+Conducts a dry run. + |
+
u + |
+Optional (additional parameter) + |
+Indicates incremental download. If this parameter is set, each object can be downloaded only when it does not exist in the local path, its size is different from the namesake one in the local path, or it has the latest modification time. + |
+
vlength + |
+Optional (additional parameter) + |
+Checks whether the sizes of the local files are the same as those of the objects in the bucket after the download is complete. + |
+
vmd5 + |
+Optional (additional parameter) + |
+Checks whether MD5 values of the local files are the same as those of the objects in the bucket after the download is complete. + NOTE:
+Objects in the bucket must contain metadata x-obs-meta-md5chksum, or MD5 verification will be skipped. + CAUTION:
+If your object needs encryption, do not use this parameter. + |
+
p + |
+Optional (additional parameter) + |
+The maximum number of concurrent multipart download tasks when downloading an object. The default value is the value of defaultParallels in the configuration file. + |
+
threshold + |
+Optional (additional parameter) + |
+Indicates the threshold for enabling multipart download, in bytes. The default value is the value of defaultBigfileThreshold in the configuration file. + NOTE:
+
|
+
versionId + |
+Optional for downloading an object (additional parameter) + |
+The source object version ID that can be specified when downloading an object + |
+
ps + |
+Optional (additional parameter) + |
+The size of each part in a multipart download task, in bytes. The default value is the value of defaultPartSize in the configuration file. + NOTE:
+
|
+
cpd + |
+Optional (additional parameter) + |
+The folder where the part records reside. The default value is .obsutil_checkpoint, the subfolder in the home directory of the user who executes obsutil commands. + NOTE:
+A part record is generated during a multipart download and saved to the down subfolder. After the download succeeds, its part record is deleted automatically. If the download fails or is suspended, the system attempts to resume the task according to its part record when you perform the download the next time. + |
+
r + |
+Mandatory for downloading objects in batches (additional parameter) + |
+Copies objects in batches based on a specified object name prefix. + |
+
f + |
+Optional for downloading objects in batches (additional parameter) + |
+Runs in force mode. + |
+
j + |
+Optional for downloading objects in batches (additional parameter) + |
+The maximum number of concurrent tasks for downloading objects in a batch. The default value is the value of defaultJobs in the configuration file. + NOTE:
+The value is ensured to be greater than or equal to 1. + |
+
exclude + |
+Optional for downloading objects in batches (additional parameter) + |
+The matching patterns of source objects that are excluded, for example, *.txt + NOTE:
+
NOTICE:
+
|
+
include + |
+Optional for downloading objects in batches (additional parameter) + |
+Specifies what formats of objects can be downloaded. If this parameter is set to *.jpg, only objects in the .jpg format can be downloaded. + NOTE:
+
NOTICE:
+
|
+
timeRange + |
+Optional for downloading objects in batches (additional parameter) + |
+The time range matching pattern when downloading objects. Only objects whose latest modification time is within the configured time range are downloaded. +This pattern has a lower priority than the object matching patterns (exclude/include). That is, the time range matching pattern is executed after the configured object matching patterns. + NOTE:
+
NOTICE:
+
|
+
mf + |
+Optional (additional parameter) + |
+Indicates that the name matching pattern (include or exclude) and the time matching pattern (timeRange) also take effect on objects whose names end with a slash (/). + + |
+
o + |
+Optional (additional parameter) + |
+The folder that stores the result files. After the command is executed, result files (possibly success, failure, and warning files) will be created in the specified folder. The default value is .obsutil_output, a subfolder in the user's home directory where obsutil commands are executed. + NOTE:
+
|
+
bucket-cname + |
+Optional (additional parameter) + |
+The user-defined domain name bound to the bucket + NOTE:
+This parameter is only supported by obsutil 5.7.9 and later. + |
+
config + |
+Optional (additional parameter) + |
+The user-defined configuration file for executing the current command. For details about parameters that can be configured, see Configuration Parameters. + |
+
payer + |
+Optional (additional parameter) + |
+Specifies that requester pays is enabled. + |
+
Refer to Response for uploading an object.
+You can use this command to query multipart upload tasks in a bucket.
+obsutil ls obs://bucket[/prefix] [-s] [-d] -m [-a] [-uploadIdMarker=xxx] [-marker=xxx] [-limit=1] [-config=xxx]+
./obsutil ls obs://bucket[/prefix] [-s] [-d] -m [-a] [-uploadIdMarker=xxx] [-marker=xxx] [-limit=1] [-config=xxx]+
obsutil ls obs://bucket-test -m -limit=10 + +Listing multipart uploads. + +Upload list: +Key Initiated +StorageClass UploadId +obs://bucket-test/aaa 2018-11-27T03:49:07Z +standard 000001675348ED21860C3F61EF955BD3 + +obs://bucket-test/dir1/10GB.txt 2018-11-07T06:58:09Z +standard 00000166ECF6CF7C860D1DBAF3F76013 + +obs://bucket-test/dir1/1GB.txt 2018-11-07T06:58:09Z +standard 00000166ECF6CF6F860B7FBE95D01B03 + +obs://bucket-test/dir1/50GB.txt 2018-11-07T06:58:09Z +standard 00000166ECF6CF86860D1DC2C8E8F66B + +obs://bucket-test/dir1/5GB.txt 2018-11-07T06:58:09Z +standard 00000166ECF6CF75860CDA7780CB52C3 + +obs://bucket-test/test11/20GB.txt 2018-11-27T08:21:26Z +standard 0000016754423D24860CA8A4D06C2054 + +Folder number: 0 +Upload number: 6+
Parameter + |
+Optional or Mandatory + |
+Description + |
+
|---|---|---|
bucket + |
+Mandatory + |
+The bucket name + |
+
prefix + |
+Optional + |
+The object name prefix for listing multipart uploads + NOTE:
+If this parameter is left blank, all multipart upload tasks in the bucket are listed. + |
+
s + |
+Optional (additional parameter) + |
+Displays simplified query result. + NOTE:
+In the simplified format, the returned result contains only the object name and upload ID of the multipart upload. + |
+
d + |
+Optional (additional parameter) + |
+Lists only the multipart upload tasks and sub-directories in the current directory are listed, instead of recursively listing all the multipart upload tasks and sub-directories. + |
+
m + |
+Mandatory (additional parameter) + |
+Lists multipart upload tasks in the bucket. + |
+
a + |
+Optional (additional parameter) + |
+Lists the objects and the multipart upload tasks in the bucket. + |
+
marker + |
+Optional (additional parameter) + |
+The start position for listing multipart upload tasks in a bucket. The multipart upload tasks following this start position are sorted in lexicographical order by object name. + NOTE:
+For details about how to use this parameter, see Listing Multipart Upload Tasks. + |
+
uploadIdMarker + |
+Optional (additional parameter) + |
+The start position for listing multipart upload tasks in a bucket. This parameter must be used together with marker. The multipart upload tasks following this start position are sorted in lexicographical order by object name and upload ID. + |
+
limit + |
+Optional (additional parameter) + |
+The maximum number of objects that can be listed. If the value is less than or equal to 0, all objects are listed. + NOTE:
+If there are a large number of multipart upload tasks in a bucket, you are advised to set this parameter to limit the number of multipart upload tasks each time. If not all tasks are listed, marker and uploadIdMarker of the next request will be returned in the result, which you can use to list the remaining tasks. + |
+
config + |
+Optional (additional parameter) + |
+The user-defined configuration file for executing the current command. For details about parameters that can be configured, see Configuration Parameters. + |
+
payer + |
+Optional (additional parameter) + |
+Specifies that requester pays is enabled. + |
+
obsutil abort obs://bucket/key -u=xxx [-f] [-fr] [-o=xxx] [-config=xxx]+
obsutil abort obs://bucket[/key] -r [-f] [-o=xxx] [-j=1] [-config=xxx]+
./obsutil abort obs://bucket/key -u=xxx [-f] [-fr] [-o=xxx] [-config=xxx]+
./obsutil abort obs://bucket[/key] -r [-f] [-o=xxx] [-j=1] [-config=xxx]+
obsutil abort obs://bucket-test/key -u=xxx -f + +Start at 2024-10-08 01:25:55.6771288 +0000 UTC + +[--------------------------------------------------] 100.00% tps:0.00 1/1 106ms +Succeed count: 1 Failed count: 0 +Metrics [max cost:54 ms, min cost:54 ms, average cost:54.00 ms, average tps:8.77] + +Task id: 4972589c-c775-41be-a288-bbee3edaaee9+
obsutil abort obs://bucket-test -r -f +Start at 2024-10-08 01:28:29.1980739 +0000 UTC + +[-----------------------------------------------] 100.00% tps:2924.55 3/3 202ms +Succeed count: 3 Failed count: 0 +Metrics [max cost:148 ms, min cost:61 ms, average cost:113.33 ms, average tps:14.63] + +Task id: cd2fd08e-fc31-47d9-b4b0-9f9a3376435f+
Parameter + |
+Optional or Mandatory + |
+Description + |
+
|---|---|---|
bucket + |
+Mandatory + |
+The bucket name + |
+
key + |
+Mandatory for deleting a multipart upload task. +Optional for deleting multipart upload tasks in batches. + |
+The object name involved in a multipart upload task to be deleted, or the name prefix of the objects involved in multipart upload tasks to be deleted in batches + NOTE:
+If this parameter is left blank when deleting multipart upload tasks in batches, all multipart upload tasks in the bucket are deleted. + |
+
u + |
+Mandatory for deleting a single multipart upload task (additional parameter) + |
+The ID of the multipart upload task to be deleted + NOTE:
+You can obtain the value of this parameter from Listing Multipart Upload Tasks. + |
+
fr + |
+Optional for deleting a single multipart upload task (additional parameter) + |
+Generates an operation result file when deleting a multipart upload task. + |
+
f + |
+Optional (additional parameter) + |
+Runs in force mode. + |
+
r + |
+Mandatory for deleting multipart upload tasks (additional parameter) + |
+Deletes multipart upload tasks in batches based on a specified object name prefix. + |
+
j + |
+Optional for deleting multipart upload tasks (additional parameter) + |
+The maximum number of concurrent tasks for deleting multipart uploads in batches. The default value is the value of defaultJobs in the configuration file. + NOTE:
+The value is ensured to be greater than or equal to 1. + |
+
o + |
+Optional (additional parameter) + |
+The folder that stores the result files. After the command is executed, result files (possibly success and failure files) will be created in the specified folder. The default value is .obsutil_output, a subfolder in the user's home directory where obsutil commands are executed. + NOTE:
+
|
+
config + |
+Optional (additional parameter) + |
+The user-defined configuration file for executing the current command. For details about parameters that can be configured, see Configuration Parameters. + |
+
payer + |
+Optional (additional parameter) + |
+Specifies that requester pays is enabled. + |
+
Refer to Response for uploading an object.
+
The delete operation cannot be undone.
+In big data scenarios, parallel file systems usually have deep directory levels and each directory has a large number of files. In such case, deleting directories from parallel file systems may fail due to timeout. To address this problem, you are advised to delete directories in either of the following ways:
+obsutil rm obs://bucket/key [-f] [-versionId=xxx] [-fr] [-o=xxx] [-config=xxx]+
obsutil rm obs://bucket/[key] -r [-j=1] [-f] [-v] [-o=xxx] [-config=xxx]+
./obsutil rm obs://bucket/key [-f] [-versionId=xxx] [-fr] [-o=xxx] [-config=xxx]+
./obsutil rm obs://bucket/[key] -r [-j=1] [-f] [-v] [-o=xxx] [-config=xxx]+
obsutil rm obs://bucket-test/key -f + +Start at 2024-09-25 04:48:10.1147483 +0000 UTC + +Delete object [key] in the bucket [bucket-test] successfully, cost [152], request id [0000016979E1D2B2860BB5181229C72C]+
obsutil rm obs://bucket-test -r -f +Start at 2024-09-30 08:46:55.5335644 +0000 UTC + +[===============================================] 100.00% 21s +Succeed count: 1313 Failed count: 0 +Task id: 95936984-f81a-441a-bba0-1fd8254d9241+
obsutil rm obs://bucket-test/key -r -f +Start at 2024-09-30 08:49:09.5602115 +0000 UTC + +[===============================================] 100.00% 21s +Succeed count: 10 Failed count: 0 +Task id: 79ab59ec-7e00-4f22-8c88-465faa834125+
Parameter + |
+Optional or Mandatory + |
+Description + |
+
|---|---|---|
bucket + |
+Mandatory + |
+The bucket name + |
+
key + |
+Mandatory for deleting a single object. +Optional for deleting objects in batches. + |
+The name of the object to be deleted, or the name prefix of the objects to be deleted in batches + NOTE:
+If this parameter is left blank when deleting objects in batches, all objects in the bucket are deleted. + |
+
fr + |
+Optional for deleting a single object (additional parameter) + |
+Generates an operation result file when deleting an object. + |
+
f + |
+Optional (additional parameter) + |
+Runs in force mode. + |
+
versionId + |
+Optional for deleting a single object (additional parameter) + |
+The version ID of the object to be deleted. + |
+
r + |
+Mandatory for deleting objects in batches (additional parameter) + |
+Deletes objects in batches based on a specified object name prefix. + CAUTION:
+When you batch delete objects, all objects with the specified prefix will be deleted. + |
+
j + |
+Optional for deleting objects in batches (additional parameter) + |
+The maximum number of concurrent tasks for deleting objects in batches. The default value is the value of defaultJobs in the configuration file. + NOTE:
+The value is ensured to be greater than or equal to 1. + |
+
v + |
+Optional for deleting objects in batches (additional parameter) + |
+Deletes versions of an object and the delete markers in batches based on a specified object name prefix. + |
+
o + |
+Optional (additional parameter) + |
+The folder that stores the result files. After the command is executed, result files (possibly success and failure files) will be created in the specified folder. The default value is .obsutil_output, a subfolder in the user's home directory where obsutil commands are executed. + NOTE:
+
|
+
bucket-cname + |
+Optional (additional parameter) + |
+The user-defined domain name bound to the bucket + NOTE:
+This parameter is only supported by obsutil 5.7.9 and later. + |
+
config + |
+Optional (additional parameter) + |
+The user-defined configuration file for executing the current command. For details about parameters that can be configured, see Configuration Parameters. + |
+
payer + |
+Optional (additional parameter) + |
+Specifies that requester pays is enabled. + |
+
Refer to Response for uploading an object.
+You can update items in the .obsutilconfig file, including the endpoint, AK, SK, and token.
+Configuration Parameters describes parameters in the .obsutilconfig file.
+obsutil config -interactive [-crr] [-config=xxx]+
./obsutil config -interactive [-crr] [-config=xxx]+
obsutil config -interactive + +Please input your ak: +xxxxxxxxxxxxxxxxxxxxxxxxx +Please input your sk: +xxxxxxxxxxxxxxxxxxxxxxxxx +Please input your endpoint: +xxxxxxxxxxxxxxxxxxxxxxxxx +Please input your token: +xxxxxxxxxxxxxxxxxxxxxxxxx +Config file url: + C:\Users\tools\.obsutilconfig + +Update config file successfully!+
./obsutil config -interactive + +Please input your ak: +xxxxxxxxxxxxxxxxxxxxxxxxx +Please input your sk: +xxxxxxxxxxxxxxxxxxxxxxxxx +Please input your endpoint: +xxxxxxxxxxxxxxxxxxxxxxxxx +Please input your token: +xxxxxxxxxxxxxxxxxxxxxxxxx +Config file url: + /root/.obsutilconfig + +Update config file successfully!+
Parameter + |
+Optional or Mandatory + |
+Description + |
+
|---|---|---|
interactive + |
+Optional (additional parameter) + |
+Updates settings in interactive mode. + |
+
crr + |
+Optional (additional parameter) + |
+Updates the settings of client-side cross-region replication. + NOTE:
+If this parameter is not specified, endpoint, ak, sk, and token will be updated. +If this parameter is specified, endpointCrr, akCrr, skCrr, and tokenCrr will be updated. + |
+
config + |
+Optional (additional parameter) + |
+The user-defined configuration file for executing the current command. For details about parameters that can be configured, see Configuration Parameters. +By specifying this parameter and a path, you can update parameters in the user-defined configuration file. Otherwise, parameters in the default configuration file will be updated. + |
+
You can use this command to delete part records from a specified directory.
+obsutil clear [checkpoint_dir] [-u] [-d] [-c] [-config=xxx]+
./obsutil clear [checkpoint_dir] [-u] [-d] [-c] [-config=xxx]+
obsutil clear -u + +Clear checkpoint files for uploading in folder [xxxxx] +Start at 2024-10-08 01:49:37.6541204 +0000 UTC +[==================================================================] 100.00% 0s +Succeed files is: 1 Failed files is: 0+
Parameter + |
+Optional or Mandatory + |
+Description + |
+
|---|---|---|
checkpoint_dir + |
+Optional + |
+The folder where the part records reside. The default value is .obsutil_checkpoint, the same subfolder where obsutil commands reside. + |
+
u + |
+Optional (additional parameter) + |
+Deletes the part records of all multipart upload tasks. + NOTE:
+At the same time, the system attempts to delete the multipart upload tasks in the part records. + |
+
d + |
+Optional (additional parameter) + |
+Deletes the part records of all multipart download tasks. + NOTE:
+At the same time, the system attempts to delete the fragments in the part records. + |
+
c + |
+Optional (additional parameter) + |
+Deletes the part records of all multipart copy tasks. + NOTE:
+At the same time, the system attempts to delete the multipart copy tasks in the part records. + |
+
config + |
+Optional (additional parameter) + |
+The user-defined configuration file for executing a command. For details about parameters that can be configured, see Configuration Parameters. + |
+
You must configure at least one among the u, d and c parameters.
+You can use this command to view the commands supported by obsutil or view the help information of a specific command.
+obsutil help [command]+
./obsutil help [command]+
obsutil help mb + +Summary: + create a bucket with the specified parameters + +Syntax: + obsutil mb obs://bucket [-acl=xxx] [-location=xxx] [-fs] [-az=xxx] [-sc=xxx] [-config=xxx] [-i=xxx] [-k=xxx] [-t=xxx] [-e=xxx] + +Options: + -fs + create a bucket that supports POSIX + + -az=xxx + the AZ of the bucket, possible values are [multi-az] + + -sc=xxx + the default storage class of the bucket, possible values are [standard|warm|cold|deep-archive] + + -acl=xxx + the ACL of the bucket, possible values are [private|public-read|public-read-write] + + -location=xxx + the region where the bucket is located + + -epid=xxx + the enterprise project id of the bucket + + -kms=xxx + the encryption id of the bucket + + -config=xxx + the path to the custom config file when running this command + + -e=xxx + endpoint + + -i=xxx + access key ID + + -k=xxx + security key ID + + -t=xxx + security token + +Summary: +create a bucket with the specified parameters + +Syntax: + obsutil mb obs://bucket [-fs] [-acl=xxx] [-sc=xxx] [-location=xxx] [-config=xxx] + +Options: + -fs + create a bucket that supports POSIX + + -acl=xxx + the ACL of the bucket, possible values are [private|public-read|public-read-write] + + -sc=xxx + the default storage class of the bucket, possible values are: [standard|warm|cold] + + -location=xxx + the region where the bucket is located + + -config=xxx + the path to the custom config file when running this command+
You can use this command to query the current version of obsutil.
+obsutil version+
./obsutil version+
Take the Windows OS as an example.
+obsutil version + +obsutil version:5.1.9, obssdk version:2.2.12 +operating system:windows, arch:amd64+
All commands in this section use the Linux operating system as an example to describe how to upload files.
+Assume that a local folder is in the following structure:
+└── src1 + ├── src2 + ├── test1.txt + └── test2.txt + ├── src3 + └── test3.txt+
Based on the preceding folder structure, different upload scenarios require different commands.
+./obsutil cp /src1/test3.txt obs://bucket-test+
After the upload completes, the following object is generated in the bucket:
+./obs://bucket-test/test3.txt+
./obsutil cp /src1/test3.txt obs://bucket-test/aaa.txt+
After the upload completes, the following object is generated in the bucket:
+./obs://bucket-test/aaa.txt+
./obsutil cp /src1/test3.txt obs://bucket-test/src/+
After the upload completes, the following object is generated in the bucket:
+./obs://bucket-test/src/test3.txt+
./obsutil cp /src1/src2 obs://bucket-test -r -f+
After the upload completes, the following objects are generated in the bucket:
+obs://bucket-test/src2/ +obs://bucket-test/src2/test1.txt +obs://bucket-test/src2/test2.txt+
./obsutil cp /src1 obs://bucket-test/src -r -f+
After the upload completes, the following objects are generated in the bucket:
+obs://bucket-test/src/src1/ +obs://bucket-test/src/src1/src2/ +obs://bucket-test/src/src1/src2/test1.txt +obs://bucket-test/src/src1/src2/test2.txt +obs://bucket-test/src/src1/src3/ +obs://bucket-test/src/src1/test3.txt+
./obsutil cp /src1 obs://bucket-test/src -r -f -flat+
After the upload completes, the following objects are generated in the bucket:
+obs://bucket-test/src/ +obs://bucket-test/src/src2/ +obs://bucket-test/src/src2/test1.txt +obs://bucket-test/src/src2/test2.txt +obs://bucket-test/src/src3/ +obs://bucket-test/src/test3.txt+
./obsutil cp /file1 obs://bucket-test/file -f+
The upload fails. The command output is as follows:
+./obsutil cp /file1 obs://bucket-test/file -f + +Parallel: 3 Jobs: 3 +Threshold: 524288000 PartSize: 5242880 +VerifyLength: false VerifyMd5: false +CheckpointDir: xxxx + +[=================================__________________] 66.08% ?/s 3.35GB/4.88GB ?+
Run the preceding command again to resume the upload. The command output is as follows:
+obsutil cp /file1 obs://bucket-test/file -f+
Parallel: 3 Jobs: 3 +Threshold: 524288000 PartSize: 5242880 +VerifyLength: false VerifyMd5: false +CheckpointDir: xxxx + +[====================================================] 100% 307.42MB/s 4.88GB/4.88GB 5.308s +Upload successfully, 4.88GB, n/a, /file1 --> obs://bucket-test/file, cost [6325], status [200], request id [xxxxx]+
./obsutil cp /src1 obs://bucket-test/src -f -r -u+
Four objects are successfully uploaded, one of which is a new object. The command output contains Skip count.
+./obsutil cp /src1 obs://bucket-test/src -f -r -u+
Start at 2024-10-08 02:00:18.8906532 +0000 UTC + +Parallel: 5 Jobs: 5 +Threshold: 50.00MB PartSize: auto +VerifyLength: false VerifyMd5: false +CheckpointDir: xxxx +Task id: 6a97974a-7929-4188-9736-fcd637d16584 +OutputDir: xxxx +[====================================================] 100% tps:0.00 ?/s 2.09KB/2.09KB 5ms +Succeed count: 4 Failed count: 0 Skip count: 3 +Succeed bytes: 2.09KB +Metrics [max cost:6 ms, min cost:6 ms, average cost:1.50 ms, average tps:52.63, transferred size :2.09KB]+
./obsutil cp /src1 obs://bucket-test/src -exclude "*src1/src2*" -f -r -mf+
Five objects are successfully uploaded, and the upload information contains exclude and the specific content.
+./obsutil cp /src1 obs://bucket-test/src -exclude "*src1/src2*" -f -r -mf +Start at 2024-10-08 02:04:27.7752009 +0000 UTC +Parallel: 5 Jobs: 5 +Threshold: 50.00MB PartSize: auto +VerifyLength: false VerifyMd5: false +Exclude: *src1/src2* +Include: +CheckpointDir: xxxx +OutputDir: xxxx + +[====================================================] 100.00% tps:35.82 ?/s 5/5 2.39KB/2.39KB 340ms +Succeed count: 3 Failed count: 0 +Succeed bytes: 2.39KB +Metrics [max cost:338 ms, min cost:91 ms, average cost:240.40 ms, average tps:14.62, transferred size:2.39KB]+
After the upload completes, the following objects are generated in the bucket:
+obs://bucket-test/src/src1/ +obs://bucket-test/src/src1/src3/ +obs://bucket-test/src/src1/test3.txt+
Resumable upload is available only for large files. Specifically, the file size is greater than 5 GB or the file size is greater than the threshold (50 MB by default).
+All commands in this section use the Linux operating system as an example to describe how to download files.
+Assume that bucket bucket-test contains the following objects:
+obs://bucket-test/test1.txt +obs://bucket-test/test2.txt +obs://bucket-test/test3.txt +obs://bucket-test/test4.txt +obs://bucket-test/test5.txt +obs://bucket-test/test6.txt +obs://bucket-test/src1/ +obs://bucket-test/src1/test7.txt +obs://bucket-test/src2/ +obs://bucket-test/src2/test8.txt +obs://bucket-test/src2/src3/ +obs://bucket-test/src2/src3/test9.txt+
Based on the structure of objects in the bucket, different download scenarios require different commands.
+./obsutil cp obs://bucket-test/test1.txt /src1+
After the download is complete, the following file is generated on the local PC:
+└── src1 + └── test1.txt+
./obsutil cp obs://bucket-test/test1.txt /test.txt+
After the download is complete, the following file is generated on the local PC:
+└── test.txt
+./obsutil cp obs://bucket-test/src2 /src1 -r -f+
After the download is complete, the following files are generated on the local PC:
+└── src1 + └── src2 + ├── src3 + └── test9.txt + └── test8.txt+
./obsutil cp obs://bucket-test/src2 /src1 -r -f -flat+
After the download is complete, the following files are generated on the local PC:
+└── src1 + ├── src3 + └── test9.txt + └── test8.txt+
./obsutil cp obs://bucket-test /src0 -r -f+
After the download is complete, the following files are generated on the local PC:
+└── src0 + ├── test1.txt + ├── test2.txt + ├── test3.txt + ├── test4.txt + ├── test5.txt + ├── test6.txt + ├── src1 + └── test7.txt + └── src2 + ├── src3 + └── test9.txt + └── test8.txt+
./obsutil cp obs://bucket-test/src1/ src1 -exclude "*src1/src2*" -r -f -mf+
Four objects are successfully downloaded, and the download information contains exclude and the specific content.
+./obsutil cp obs://bucket-test/src1/ src1 -exclude "*src1/src2*" -r -f -mf + +Parallel: 5 Jobs: 5 +Threshold: 50.00MB PartSize: auto +VerifyLength: false VerifyMd5: false +Exclude: *src1/src2* +Include: +CheckpointDir: xxxx +OutputDir: xxxx +TempFileDir: xxxx + +[====================================================] 100.00% tps:87.78 ?/s 4/4 2.39KB/2.39KB 223ms +Succeed count: 4 Failed count: 0 +Succeed bytes: 2.39KB +Metrics [max cost:147 ms, min cost:77 ms, average cost:56.00 ms, average tps:8.85, transferred size:2.39KB]+
After the download is complete, the following files are generated on the local PC:
+└── src1 + ├── src3 + └── test9.txt + └── test7.txt+
All commands in this section use the Linux operating system as an example to describe how to copy files.
+Assume that bucket bucket-src contains the following objects:
+obs://bucket-src/test1.txt +obs://bucket-src/test2.txt +obs://bucket-src/test3.txt +obs://bucket-src/test4.txt +obs://bucket-src/test5.txt +obs://bucket-src/test6.txt +obs://bucket-src/src1/ +obs://bucket-src/src1/test7.txt +obs://bucket-src/src2/ +obs://bucket-src/src2/test8.txt +obs://bucket-src/src2/src3/ +obs://bucket-src/src2/src3/test9.txt+
Based on the structure of objects in the bucket, different copy scenarios require different commands.
+./obsutil cp obs://bucket-src/test1.txt obs://bucket-dest+
After the copy is complete, the following object is generated in bucket bucket-dest:
+obs://bucket-dest/test1.txt+
./obsutil cp obs://bucket-src/test1.txt obs://bucket-dest/test.txt+
After the copy is complete, the following object is generated in bucket bucket-dest:
+obs://bucket-dest/test.txt+
./obsutil cp obs://bucket-src/test1.txt obs://bucket-dest/test/+
After the copy is complete, the following object is generated in bucket bucket-dest:
+obs://bucket-dest/test/test1.txt+
./obsutil cp obs://bucket-src/src2 obs://bucket-dest -r -f+
After the copy is complete, the following objects are generated in bucket bucket-dest:
+obs://bucket-dest/src2/ +obs://bucket-dest/src2/test8.txt +obs://bucket-dest/src2/src3/ +obs://bucket-dest/src2/src3/test9.txt+
./obsutil cp obs://bucket-src/src2 obs://bucket-dest -r -f -flat+
After the copy is complete, the following objects are generated in bucket bucket-dest:
+obs://bucket-dest/test8.txt +obs://bucket-dest/src3/ +obs://bucket-dest/src3/test9.txt+
All commands in this section use the Linux operating system as an example to describe how to list files.
+Assume that bucket bucket-test contains the following objects:
+obs://bucket-test/test1.txt +obs://bucket-test/test2.txt +obs://bucket-test/test3.txt +obs://bucket-test/test4.txt +obs://bucket-test/test5.txt +obs://bucket-test/test6.txt +obs://bucket-test/src1/ +obs://bucket-test/src1/test7.txt +obs://bucket-test/src2/ +obs://bucket-test/src2/test8.txt+
Based on the structure of objects in the bucket, different object listing scenarios require different commands.
+./obsutil ls obs://bucket-test -limit=3+
The returned result is listed in lexicographical order by object name and version ID as follows:
+obs://bucket-test/test1.txt +obs://bucket-test/test2.txt +obs://bucket-test/test3.txt+
./obsutil ls obs://bucket-test -limit=3 -marker=test3.txt+
The returned result is listed in lexicographical order by object name and version ID as follows:
+obs://bucket-test/test4.txt +obs://bucket-test/test5.txt +obs://bucket-test/test6.txt+
./obsutil ls obs://bucket-test -d+
The returned result is listed in lexicographical order by object name and version ID as follows:
+obs://bucket-test/test1.txt +obs://bucket-test/test2.txt +obs://bucket-test/test3.txt +obs://bucket-test/test4.txt +obs://bucket-test/test5.txt +obs://bucket-test/test6.txt +obs://bucket-test/src1/ +obs://bucket-test/src2/+
All commands in this section use the Linux operating system as an example to describe how to list multipart upload tasks.
+Assume that bucket bucket-test contains the following multipart upload tasks:
+obs://bucket-test/task1.txt uploadid1 +obs://bucket-test/task1.txt uploadid2 +obs://bucket-test/task2.txt uploadid3 +obs://bucket-test/task3.txt uploadid4 +obs://bucket-test/src1/ +obs://bucket-test/src1/task4.txt uploadid5 +obs://bucket-test/src2/ +obs://bucket-test/src2/task5.txt uploadid6+
./obsutil ls obs://bucket-test -m -limit=3+
The returned result is listed in lexicographical order by object name as follows:
+obs://bucket-test/task1.txt uploadid1 +obs://bucket-test/task1.txt uploadid2 +obs://bucket-test/task2.txt uploadid3+
./obsutil ls obs://bucket-test -m -limit=3 -marker=task1.txt -uploadIdMarker=uploadid1+
The returned result is listed in lexicographical order by object name and upload ID as follows:
+obs://bucket-test/task1.txt uploadid2 +obs://bucket-test/task2.txt uploadid3 +obs://bucket-test/task3.txt uploadid4+
Go to the /root directory at 21:30 every day and upload the /src/src1 folder to bucket obs://bucket-test in the incremental mode.
+You have properly enabled the scheduled crond service in the Linux OS.
+
Run the service crond status command to check whether the service is enabled.
+30 21 * * * cd /root && nohup ./obsutil cp /src/src1 obs://bucket-test -r -f -u &>obsutil_crond.log &+
Assume that the obsutil tool is in the /root directory. The preceding configuration is described as follows: Go to the /root directory at 21:30 every day, upload the /src/src1 folder to bucket obs://bucket-test in incremental mode, and redirect the command output to the obsutil_crond.log file in the /root directory.
+You can set obsutil parameters in the .obsutilconfig file.
+Configuration file format:
+endpoint=<value> +ak=<value> +sk=<value> +token=<value> +endpointCrr=<value> +akCrr=<value> +skCrr=<value> +tokenCrr=<value> +connectTimeout=<value> +socketTimeout=<value> +maxRetryCount=<value> +maxConnections=<value> +defaultBigfileThreshold=<value> +defaultPartSize=<value> +defaultParallels=<value> +defaultJobs=<value> +defaultJobsCacheCount=<value> +rateLimitThreshold=<value> +sdkLogBackups=<value> +sdkLogLevel=<value> +sdkLogPath=<value> +sdkMaxLogSize=<value> +utilLogBackups=<value> +utilLogLevel=<value> +utilLogPath=<value> +utilMaxLogSize=<value> +writeBufferIoSize=<value> +readBufferIoSize=<value> +recordMaxLogSize=<value> +recordBackups=<value> +humanReadableFormat=<value> +showProgressBar=<value> +showStartTime=<value> +helpLanguage=<value> +defaultTempFileDir=<value> +checkSourceChange=<value> +skipCheckEmptyFolder=<value> +fsyncForDownload=<value> +memoryEconomicalScanForUpload=<value> +forceOverwriteForDownload=<value> +panicForSymbolicLinkCircle=<value> +fastFailThreshold=<value> +abortHttpStatusForResumableTasks=<value> +showBytesForCopy=<value> +proxyUrl=<value> +faultTolerantMode=<value>+
Table 1 describes the parameters.
+ +Parameter + |
+Optional or Mandatory + |
+Description + |
+Recommended Value + |
+
|---|---|---|---|
endpoint + |
+Mandatory + |
+Endpoint for accessing OBS, which can contain the protocol type, domain name, and port number (optional), for example, https://your-endpoint:443. (For security purposes, you are advised to use HTTPS. The port number 443 can be omitted.) + NOTE:
+
|
+N/A + |
+
ak + |
+Mandatory + |
+Access key ID. + NOTE:
+
|
+N/A + |
+
sk + |
+Mandatory + |
+Secret access key. + NOTE:
+
|
+N/A + |
+
token + |
+Optional + |
+Security token. If this parameter is empty, the security token is not set. When temporary AK and SK are used to access OBS, the token must be carried. + |
+N/A + |
+
endpointCrr + |
+Optional + |
+Endpoint for accessing OBS in the region where the source bucket resides when the client-side cross-region replication function is enabled, which can contain the protocol type, domain name, and port number, for example, https://your-endpoint:443. (For security purposes, you are advised to use HTTPS. The port number 443 can be omitted.) + NOTE:
+
+
|
+N/A + |
+
akCrr + |
+Optional + |
+AK for the source bucket when the client-side cross-region replication function is enabled + |
+N/A + |
+
skCrr + |
+Optional + |
+SK for the source bucket when the client-side cross-region replication function is enabled + |
+N/A + |
+
tokenCrr + |
+Optional + |
+Security token used by the source bucket when the client-side cross-region replication is used. If this parameter is left blank, no security token is set. This parameter is mandatory when temporary access keys are used for access. + |
+N/A + |
+
connectTimeout + |
+Optional + |
+Timeout interval for establishing an HTTP/HTTPS connection, in seconds. The default value is 30. + |
+[5, 120] + |
+
socketTimeout + |
+Optional + |
+Timeout interval for reading and writing data, in seconds. The default value is 310. + |
+[5, 600] + |
+
maxRetryCount + |
+Optional + |
+Maximum number of retry attempts. The default value is 3. + NOTE:
+When an OBS request completes but HTTP status code 408 or 5XX is returned, or when a timeout error occurs in an OBS request, the request is retried. + |
+[0, 5] + |
+
maxConnections + |
+Optional + |
+Maximum number of HTTP connections that can be accessed. The default value is 1000. + |
+N/A + |
+
defaultBigfileThreshold + |
+Optional + |
+Threshold for triggering a multipart upload, in bytes. If the size of a file to be uploaded, downloaded, or copied is greater than the specified threshold, the file will be uploaded, downloaded, or copied using a multipart upload. The default value is 50MB. + NOTE:
+This parameter value can contain a unit, for example, 1MB (indicating 1,048,576 bytes). + |
+Greater than 5MB + |
+
defaultPartSize + |
+Optional + |
+Size of each part, in bytes. The default value is auto. + NOTE:
+
|
+[9MB, 100MB] + |
+
defaultParallels + |
+Optional + |
+Maximum number of concurrent tasks in the multipart mode. The default value is 5. + |
+Set this parameter according to Fine-Tuning obsutil Performance. + |
+
defaultJobs + |
+Optional + |
+Maximum number of concurrent tasks in batches. The default value is 5. + NOTE:
+Batch tasks include uploading, downloading, and copying folders, as well as restoring and deleting objects in batches. + |
+[1, 50] + |
+
defaultJobsCacheCount + |
+Optional + |
+Cache size of a batch task queue, indicating the maximum number of tasks that can be cached. The default value is 1000000. + NOTE:
+More cached tasks consume more memory resources. Therefore, you are advised to adjust the value of this parameter based on site requirements. + |
+Default value + |
+
rateLimitThreshold + |
+Optional + |
+Traffic control threshold of an upload or a download request, in bytes per second. The default value is 0, indicating that traffic is not limited. The minimum value is 10KB. + NOTE:
+This parameter value can contain a unit, for example, 1MB (indicating 1,048,576 bytes). + |
+Greater than 100KB + |
+
sdkLogBackups + |
+Optional + |
+Maximum number of SDK log files that can be retained. The default value is 10. + |
+N/A + |
+
sdkLogLevel + |
+Optional + |
+SDK log level. Possible values are: +
The default value is WARN. + |
+N/A + |
+
sdkLogPath + |
+Optional + |
+Absolute path of SDK logs. The value must be a file path. The default value is the path of the obssdk.log file in the subfolder obsutil_log of the user's home directory (HOME in Linux or macOS and C:\Users\<Username> in Windows). + NOTE:
+
NOTICE:
+If multiple obsutil processes are running at the same time, log files may fail to be written concurrently or may be lost. In this case, add parameter -config when running commands to configure an independent configuration file for each process. + |
+N/A + |
+
sdkMaxLogSize + |
+Optional + |
+Size of an SDK log file, in bytes. The default value is 30MB. + NOTE:
+This parameter value can contain a unit, for example, 1MB (indicating 1,048,576 bytes). + |
+[10MB, 100MB] + |
+
utilLogBackups + |
+Optional + |
+Maximum number of obsutil log files that can be retained. The default value is 10. + |
+N/A + |
+
utilLogLevel + |
+Optional + |
+obsutil log level. Possible values are: +
The default value is INFO. + |
+N/A + |
+
utilLogPath + |
+Optional + |
+Absolute path of obsutil logs. The value must be a file path. The default value is the path of the obsutil.log file in the subfolder .obsutil_log of the user's home directory (HOME in Linux or macOS and C:\Users\<Username> in Windows). + NOTE:
+
NOTICE:
+If multiple obsutil processes are running at the same time, log files may fail to be written concurrently. In this case, add parameter -config when running commands to configure an independent configuration file for each process. + |
+N/A + |
+
utilMaxLogSize + |
+Optional + |
+Size of an obsutil log file, in bytes. The default value is 30MB. + NOTE:
+This parameter value can contain a unit, for example, 1MB (indicating 1,048,576 bytes). + |
+[10MB, 100MB] + |
+
writeBufferIoSize + |
+Optional + |
+Size of the cache for downloading data, in bytes. The default value is 65536. + NOTE:
+
|
+N/A + |
+
readBufferIoSize + |
+Optional + |
+Size of the cache for uploading data, in bytes. The default value is 8192. + NOTE:
+
|
+[4096, 65536] + |
+
recordMaxLogSize + |
+Optional + |
+Size of a success, failure, or warning result file of a batch task, in bytes. The default value is 30MB. + NOTE:
+This parameter value can contain a unit, for example, 1MB (indicating 1,048,576 bytes). + |
+[5MB, 100MB] + |
+
recordBackups + |
+Optional + |
+Maximum number of result files of successful or failed batch tasks that can be retained. The default value is 1024. + |
+N/A + |
+
humanReadableFormat + |
+Optional + |
+Indicates whether to convert the number of bytes in the object listing result and result list content to the human-readable format. The default value is true. + |
+N/A + |
+
showProgressBar + |
+Optional + |
+Indicates whether to display the progress bar on the console. The value true indicates that the progress bar is displayed. The default value is true. + |
+N/A + |
+
showStartTime + |
+Optional + |
+Indicates whether to display the start time on the console. The value true indicates that start time is displayed. The default value is true. + |
+N/A + |
+
helpLanguage + |
+Optional + |
+Language of the help documents. Options are as follows: +
The default value is English. + |
+N/A + |
+
defaultTempFileDir + |
+Optional + |
+Indicates the directory for storing temporary files during download. +The default value is the .obsutil_tempfile subfolder in the user directory (HOME in Linux or macOS and C:\Users\<Username> in Windows). + NOTE:
+
|
+N/A + |
+
checkSourceChange + |
+Optional + |
+Indicates whether to check the change of source files or objects during upload/download/copy. The value true indicates that the function is enabled. + |
+N/A + |
+
skipCheckEmptyFolder + |
+Optional + |
+Indicates whether to skip checking empty folders on the OBS server during download. true indicates to skip the check. The default value is false. + NOTICE:
+If this parameter is set to true, the directory structure downloaded to your local PC may be different from that in OBS. + |
+N/A + |
+
fsyncForDownload + |
+Optional + |
+Indicates whether to forcibly synchronize memory data to disks during download. The value true indicates to enable forcible synchronization. The default value is false. + NOTE:
+
|
+N/A + |
+
memoryEconomicalScanForUpload + |
+Optional + |
+Indicates whether to use the scanning mode that occupies less memory space when uploading a folder. The value true indicates using this method. The default value is true. + |
+N/A + |
+
forceOverwriteForDownload + |
+Optional + |
+Indicates to forcibly overwrite the local executable file (even if the local executable file is running) when downloading objects to the Linux OS or macOS. The value true means to overwrite, and the default value is true. + |
+N/A + |
+
panicForSymbolicLinkCircle + |
+Optional + |
+Indicates the processing method after a symbolic link loop is detected during upload. The value false indicates that errors are only recorded. The value true indicates that panic is triggered. The default value is false. + |
+N/A + |
+
fastFailThreshold + |
+Optional + |
+Threshold for fast failure upon 4XX errors of batch tasks. When the number of 4XX errors exceeds the threshold, the fast failure process is triggered. All tasks that are not executed or being scanned are suspended. The default value is 5. + NOTE:
+The fast failure mechanism is to avoid excessive traffic generated during batch task execution. To start a fast failure as soon as possible, set this parameter to 0 or -1, indicating that the fast failure process starts immediately whenever a 4XX error occurs. + |
+N/A + |
+
abortHttpStatusForResumableTasks + |
+Optional + |
+HTTP status codes for fast interruption of multipart upload, download, and copy tasks. If a sub-task of a multipart task receives an HTTP code that falls into this range, the multipart task is immediately interrupted. The default value is 401,403,404,405,409. + NOTE:
+
|
+Default value + |
+
showBytesForCopy + |
+Optional + |
+Indicates whether the progress bar displays the rate in bytes when objects are copied between buckets. The default value is false. + |
+N/A + |
+
proxyUrl + |
+Optional + |
+HTTP proxy example: http://username:password@your-proxy:8080 + NOTE:
+
|
+N/A + |
+
faultTolerantMode + |
+Optional + |
+Indicates whether to ignore the panic caused by read operations. Default value false indicates that the panic is not ignored. + |
+N/A + |
+
You can use this command to resume a failed upload task based on the task ID.
+obsutil cp -recover=xxx [-arcDir=xxx] [-dryRun] [-f] [-u] [-vlength] [-vmd5] [-j=1] [-p=1] [-threshold=52428800] [-acl=xxx] [-sc=xxx] [-meta=aaa:bbb#ccc:ddd] [-ps=auto] [-include=*.xxx] [-exclude=*.xxx] [-timeRange=time1-time2] [-mf] [-o=xxx] [-cpd=xxx] [-clear] [-config=xxx]+
./obsutil cp -recover=xxx [-arcDir=xxx] [-dryRun] [-f] [-u] [-vlength] [-vmd5] [-j=1] [-p=1] [-threshold=52428800] [-acl=xxx] [-sc=xxx] [-meta=aaa:bbb#ccc:ddd] [-ps=auto] [-include=*.xxx] [-exclude=*.xxx] [-timeRange=time1-time2] [-mf] [-o=xxx] [-cpd=xxx] [-clear] [-config=xxx]+
obsutil cp -recover 104786c8-27c2-48fc-bc6a-5886596fb0ed -f +Start at 2024-10-08 01:10:07.3809685 +0000 UTC + +Parallel: 5 Jobs: 5 +Threshold: 50.00MB PartSize: auto +VerifyLength: false VerifyMd5: false +CheckpointDir: xxxx + +Task id: a628d6da-c562-4a1f-b687-4fa125de0dc3 +OutputDir: xxxx +TempFileDir: xxxx + +[========================================================] 100.00% tps:35.71 2.02 KB/s 7.20MB/7.20MB 0s +Succeed count: 1 Failed count: 0 +Succeed bytes: xxx +Metrics [max cost:90 ms, min cost:45 ms, average cost:63.80 ms, average tps:35.71, transferred size:70B] + +Task id: a628d6da-c562-4a1f-b687-4fa125de0dc3+
Parameter + |
+Optional or Mandatory + |
+Description + |
+
|---|---|---|
recover + |
+Mandatory (additional parameter) + |
+The ID of the upload task to be resumed + NOTE:
+
|
+
arcDir + |
+Optional (additional parameter) + |
+The path to which the uploaded files are archived + |
+
dryRun + |
+Optional (additional parameter) + |
+Conducts a dry run. + |
+
u + |
+Optional (additional parameter) + |
+Indicates incremental upload. If this parameter is set, each file can be uploaded only when it does not exist in the bucket, its size is different from the namesake one in the bucket, or it has the latest modification time. + |
+
vlength + |
+Optional (additional parameter) + |
+After the upload completes, checks whether the sizes of the objects in the bucket are the same as those of the local files. + |
+
vmd5 + |
+Optional (additional parameter) + |
+After the upload completes, checks whether the MD5 values of the objects in the bucket are the same as those of the local files. + NOTE:
+
CAUTION:
+If your object needs encryption, do not use this parameter. + |
+
p + |
+Optional (additional parameter) + |
+The maximum number of concurrent multipart upload tasks when uploading a file. The default value is the value of defaultParallels in the configuration file. + |
+
threshold + |
+Optional (additional parameter) + |
+The threshold for enabling multipart upload, in bytes. The default value is the value of defaultBigfileThreshold in the configuration file. + NOTE:
+
|
+
acl + |
+Optional (additional parameter) + |
+The access control policies that can be specified when uploading files. Possible values are: +
NOTE:
+The preceding three values indicate private read and write, public read, and public read and write. + |
+
sc + |
+Optional (additional parameter) + |
+The storage classes of objects that can be specified when uploading files. Possible values are: +
|
+
meta + |
+Optional (additional parameter) + |
+The customized metadata that can be specified when uploading files. The format is key1:value1#key2:value2#key3:value3. + NOTE:
+The preceding value indicates that the object in the bucket contains three groups of customized metadata after the file is uploaded: key1:value1, key2:value2, and key3:value3. + |
+
ps + |
+Optional (additional parameter) + |
+The size of each part in a multipart upload task, in bytes. The value ranges from 100KB to 5GB. The default value is the value of defaultPartSize in the configuration file. + NOTE:
+
|
+
cpd + |
+Optional (additional parameter) + |
+The folder where the part records reside. The default value is .obsutil_checkpoint, the subfolder in the home directory of the user who executes obsutil commands. + NOTE:
+A part record is generated during a multipart upload and saved to the upload subfolder. After the upload succeeds, its part record is deleted automatically. If the upload fails or is suspended, the system attempts to resume the task according to its part record when you perform the upload the next time. + |
+
f + |
+Optional (additional parameter) + |
+Runs in force mode. + |
+
j + |
+Optional (additional parameter) + |
+The maximum number of concurrent tasks for uploading a folder. The default value is the value of defaultJobs in the configuration file. + NOTE:
+The value is ensured to be greater than or equal to 1. + |
+
exclude + |
+Optional (additional parameter) + |
+The file matching patterns that are excluded, for example: *.txt + NOTE:
+
NOTICE:
+
|
+
include + |
+Optional (additional parameter) + |
+The file matching patterns that are included, for example: *.jpg + NOTE:
+
NOTICE:
+
|
+
at + |
+Optional (additional parameter) + |
+Indicates that when resuming a failed upload task, only the files whose latest access time is within the value of timeRange are uploaded. + NOTE:
+
|
+
timeRange + |
+Optional (additional parameter) + |
+The time range matching pattern when uploading files. Only files whose latest modification time is within the configured time range are uploaded. +This pattern has a lower priority than the file matching patterns (exclude/include). That is, the time range matching pattern is executed after the configured file matching patterns. + NOTE:
+
NOTICE:
+Time in the matching pattern is the UTC time. + |
+
mf + |
+Optional (additional parameter) + |
+Indicates that the name matching pattern (include or exclude) and the time matching pattern (timeRange) also take effect on objects whose names end with a slash (/). + + |
+
o + |
+Optional (additional parameter) + |
+The folder that stores the result files. After the command is executed, result files (possibly success, failure, and warning files) will be created in the specified folder. The default value is .obsutil_output, a subfolder in the user's home directory where obsutil commands are executed. + NOTE:
+
|
+
clear + |
+Optional (additional parameter) + |
+Deletes the failure result files after the upload task is resumed. + |
+
config + |
+Optional (additional parameter) + |
+The user-defined configuration file for executing the current command. For details about parameters that can be configured, see Configuration Parameters. + |
+
payer + |
+Optional (additional parameter) + |
+Specifies that requester pays is enabled. + |
+
Refer to Response for uploading an object.
+You can use this command to resume a failed copy task based on the task ID.
+obsutil cp -recover=xxx [-dryRun] [-f] [-u] [-crr] [-vlength] [-vmd5] [-j=1] [-p=1] [-threshold=52428800] [-acl=xxx] [-sc=xxx] [-meta=aaa:bbb#ccc:ddd] [-ps=auto] [-include=*.xxx] [-exclude=*.xxx] [-timeRange=time1-time2] [-mf] [-o=xxx] [-cpd=xxx] [-clear] [-config=xxx]+
./obsutil cp -recover=xxx [-dryRun] [-f] [-u] [-crr] [-vlength] [-vmd5] [-j=1] [-p=1] [-threshold=52428800] [-acl=xxx] [-sc=xxx] [-meta=aaa:bbb#ccc:ddd] [-ps=auto] [-include=*.xxx] [-exclude=*.xxx] [-timeRange=time1-time2] [-mf] [-o=xxx] [-cpd=xxx] [-clear] [-config=xxx]+
obsutil cp -recover=0476929d-9d23-4dc5-b2f8-0a0493f027c5 -f+
Start at 2024-10-08 01:10:07.3809685 +0000 UTC + +Parallel: 5 Jobs: 5 +Threshold: 50.00MB PartSize: auto +VerifyLength: false VerifyMd5: false +CheckpointDir: xxxx + +Task id: a628d6da-c562-4a1f-b687-4fa125de0dc3 +OutputDir: xxxx +TempFileDir: xxxx + +[========================================================] 100.00% tps:35.71 2.02 KB/s 7.20MB/7.20MB 0s +Succeed count: 1 Failed count: 0 +Succeed bytes: xxx +Metrics [max cost:90 ms, min cost:45 ms, average cost:63.80 ms, average tps:35.71, transferred size:70B] + +Task id: a628d6da-c562-4a1f-b687-4fa125de0dc3+
Parameter + |
+Optional or Mandatory + |
+Description + |
+
|---|---|---|
recover + |
+Mandatory (additional parameter) + |
+The ID of the copy task to be resumed + NOTE:
+
|
+
dryRun + |
+Optional (additional parameter) + |
+Conducts a dry run. + |
+
crr + |
+Optional (additional parameter) + |
+Enables the client-side cross-region replication function. In this mode, data is directly copied to the destination bucket from the source bucket through data stream. The buckets can be any two OBS buckets. + NOTE:
+
NOTICE:
+When cross-region replication is enabled, the upload/download bandwidth, CPU, and memory resources of the host where commands are executed will be occupied, which may deteriorate the host performance. + |
+
vlength + |
+Optional (additional parameter) + |
+Verifies whether the object size in the destination bucket is the same as that in the source bucket after the copy task completes. + NOTE:
+This parameter must be used together with crr. + |
+
vmd5 + |
+Optional (additional parameter) + |
+Verifies whether the MD5 value of the destination bucket is the same as that of the source bucket after the copy task completes. + NOTE:
+
CAUTION:
+If your object needs encryption, do not use this parameter. + |
+
u + |
+Optional (additional parameter) + |
+Indicates incremental copy. If this parameter is set, each object can be copied only when it does not exist in the destination bucket, its size is different from the namesake one in the destination bucket, or it has the latest modification time. + |
+
p + |
+Optional (additional parameter) + |
+The maximum number of concurrent multipart copy tasks when copying an object. The default value is the value of defaultParallels in the configuration file. + |
+
threshold + |
+Optional (additional parameter) + |
+The threshold for enabling multipart copy, in bytes. The default value is the value of defaultBigfileThreshold in the configuration file. + NOTE:
+
|
+
acl + |
+Optional (additional parameter) + |
+The access control policies for destination objects that can be specified when copying objects. Possible values are: +
NOTE:
+The preceding three values indicate private read and write, public read, and public read and write. + |
+
sc + |
+Optional (additional parameter) + |
+The storage classes of the destination objects that can be specified when copying objects. Possible values are: +
|
+
meta + |
+Optional (additional parameter) + |
+The metadata of destination objects that can be specified when copying objects. This parameter should be configured in the following format: key1:value1#key2:value2#key3:value3. + NOTE:
+The format example above indicates that the destination objects contain three groups of custom metadata: key1:value1, key2:value2, and key3:value3. + |
+
ps + |
+Optional (additional parameter) + |
+The size of each part in a multipart copy task, in bytes. The value ranges from 100KB to 5GB. The default value is the value of defaultPartSize in the configuration file. + NOTE:
+
|
+
cpd + |
+Optional (additional parameter) + |
+The folder where the part records reside. The default value is .obsutil_checkpoint, the subfolder in the home directory of the user who executes obsutil commands. + NOTE:
+A part record is generated during a multipart copy and saved to the copy subfolder. After the copy succeeds, its part record is deleted automatically. If the copy fails or is suspended, the system attempts to resume the task according to its part record when you perform the copy the next time. + |
+
f + |
+Optional (additional parameter) + |
+Runs in force mode. + |
+
j + |
+Optional (additional parameter) + |
+The maximum number of concurrent tasks for copying objects in batches. The default value is the value of defaultJobs in the configuration file. + NOTE:
+The value is ensured to be greater than or equal to 1. + |
+
exclude + |
+Optional (additional parameter) + |
+The matching patterns of source objects that are excluded, for example: *.txt + NOTE:
+
NOTICE:
+
|
+
include + |
+Optional (additional parameter) + |
+The matching patterns of source objects that are included, for example: *.jpg + NOTE:
+
NOTICE:
+
|
+
timeRange + |
+Optional (additional parameter) + |
+The time range matching pattern when copying objects. Only objects whose latest modification time is within the configured time range are copied. +This pattern has a lower priority than the object matching patterns (exclude/include). That is, the time range matching pattern is executed after the configured object matching patterns. + NOTE:
+
NOTICE:
+
|
+
mf + |
+Optional (additional parameter) + |
+Indicates that the name matching pattern (include or exclude) and the time matching pattern (timeRange) also take effect on objects whose names end with a slash (/). + + |
+
o + |
+Optional (additional parameter) + |
+The folder that stores the result files. After the command is executed, result files (possibly success, failure, and warning files) will be created in the specified folder. The default value is .obsutil_output, a subfolder in the user's home directory where obsutil commands are executed. + NOTE:
+
|
+
clear + |
+Optional (additional parameter) + |
+Deletes the failure result files after the copy task is resumed. + |
+
config + |
+Optional (additional parameter) + |
+The user-defined configuration file for executing the current command. For details about parameters that can be configured, see Configuration Parameters. + |
+
payer + |
+Optional (additional parameter) + |
+Specifies that requester pays is enabled. + |
+
Refer to Response for uploading an object.
+You can use this command to resume a failed download task based on the task ID.
+obsutil cp -recover=xxx [-dryRun] [-tempFileDir=xxx] [-f] [-u] [-vlength] [-vmd5] [-j=1] [-p=1] [-threshold=52428800] [-ps=auto] [-include=*.xxx] [-exclude=*.xxx] [-timeRange=time1-time2] [-mf] [-o=xxx] [-cpd=xxx] [-clear] [-config=xxx]+
./obsutil cp -recover=xxx [-dryRun] [-tempFileDir=xxx] [-f] [-u] [-vlength] [-vmd5] [-j=1] [-p=1] [-threshold=52428800] [-ps=auto] [-include=*.xxx] [-exclude=*.xxx] [-timeRange=time1-time2] [-mf] [-o=xxx] [-cpd=xxx] [-clear] [-config=xxx]+
obsutil cp -recover=3066a4b0-4d21-4929-bb84-4829c32cbd0f -f -r +Start at 2024-10-08 01:10:07.3809685 +0000 UTC + +Parallel: 5 Jobs: 5 +Threshold: 50.00MB PartSize: auto +VerifyLength: false VerifyMd5: false +CheckpointDir: xxxx + +Task id: a628d6da-c562-4a1f-b687-4fa125de0dc3 +OutputDir: xxxx +TempFileDir: xxxx + +[========================================================] 100.00% tps:35.71 2.02 KB/s 7.20MB/7.20MB 0s +Succeed count: 1 Failed count: 0 +Succeed bytes: xxx +Metrics [max cost:90 ms, min cost:45 ms, average cost:63.80 ms, average tps:35.71, transferred size:70B] + +Task id: a628d6da-c562-4a1f-b687-4fa125de0dc3+
Parameter + |
+Optional or Mandatory + |
+Description + |
+
|---|---|---|
recover + |
+Mandatory (additional parameter) + |
+The ID of the download task to be resumed + NOTE:
+
|
+
tempFileDir + |
+Optional (additional parameter) + |
+The directory for storing temporary files during download. The default value is the value of defaultTempFileDir in the configuration file. + NOTE:
+
|
+
dryRun + |
+Optional (additional parameter) + |
+Conducts a dry run. + |
+
u + |
+Optional (additional parameter) + |
+Indicates incremental download. If this parameter is set, each object can be downloaded only when it does not exist in the local path, its size is different from the namesake one in the local path, or it has the latest modification time. + |
+
vlength + |
+Optional (additional parameter) + |
+Checks whether the sizes of the local files are the same as those of the objects in the bucket after the download is complete. + |
+
vmd5 + |
+Optional (additional parameter) + |
+Checks whether MD5 values of the local files are the same as those of the objects in the bucket after the download is complete. + NOTE:
+Objects in the bucket must contain metadata x-obs-meta-md5chksum, or MD5 verification will be skipped. + CAUTION:
+If your object needs encryption, do not use this parameter. + |
+
p + |
+Optional (additional parameter) + |
+The maximum number of concurrent multipart download tasks when downloading an object. The default value is the value of defaultParallels in the configuration file. + |
+
threshold + |
+Optional (additional parameter) + |
+The threshold for enabling multipart download, in bytes. The default value is the value of defaultBigfileThreshold in the configuration file. + NOTE:
+
|
+
ps + |
+Optional (additional parameter) + |
+The size of each part in a multipart download task, in bytes. The default value is the value of defaultPartSize in the configuration file. + NOTE:
+
|
+
cpd + |
+Optional (additional parameter) + |
+The folder where the part records reside. The default value is .obsutil_checkpoint, the subfolder in the home directory of the user who executes obsutil commands. + NOTE:
+A part record is generated during a multipart download and saved to the down subfolder. After the download succeeds, its part record is deleted automatically. If the download fails or is suspended, the system attempts to resume the task according to its part record when you perform the download the next time. + |
+
f + |
+Optional (additional parameter) + |
+Runs in force mode. + |
+
j + |
+Optional (additional parameter) + |
+The maximum number of concurrent tasks for downloading objects in a batch. The default value is the value of defaultJobs in the configuration file. + NOTE:
+The value is ensured to be greater than or equal to 1. + |
+
exclude + |
+Optional (additional parameter) + |
+The matching patterns of source objects that are excluded, for example: *.txt + NOTE:
+
NOTICE:
+
|
+
include + |
+Optional (additional parameter) + |
+The matching patterns of source objects that are included, for example: *.jpg + NOTE:
+
NOTICE:
+
|
+
timeRange + |
+Optional (additional parameter) + |
+The time range matching pattern when downloading objects. Only objects whose latest modification time is within the configured time range are downloaded. +This pattern has a lower priority than the object matching patterns (exclude/include). That is, the time range matching pattern is executed after the configured object matching patterns. + NOTE:
+
NOTICE:
+
|
+
mf + |
+Optional (additional parameter) + |
+Indicates that the name matching pattern (include or exclude) and the time matching pattern (timeRange) also take effect on objects whose names end with a slash (/). + + |
+
o + |
+Optional (additional parameter) + |
+The folder that stores the result files. After the command is executed, result files (possibly success, failure, and warning files) will be created in the specified folder. The default value is .obsutil_output, a subfolder in the user's home directory where obsutil commands are executed. + NOTE:
+
|
+
clear + |
+Optional (additional parameter) + |
+Deletes the failure result files after the download task is resumed. + |
+
config + |
+Optional (additional parameter) + |
+The user-defined configuration file for executing the current command. For details about parameters that can be configured, see Configuration Parameters. + |
+
payer + |
+Optional (additional parameter) + |
+Specifies that requester pays is enabled. + |
+
Refer to Response for uploading an object.
+obsutil client supports cross-region replication. You can directly replicate data from a source bucket to the destination bucket through data streams. The source bucket and destination bucket can be any two OBS buckets. Objects can be replicated between buckets in different regions under the same account or across accounts. The following procedure describes how to replicate data between buckets across accounts and regions:
+obsutil config -interactive -crr
+./obsutil config -interactive -crr
+obsutil config -interactive
+./obsutil config -interactive
+obsutil ls -s+
./obsutil ls -s+
Check the command output:
+
If the command output contains "Http status [403]", you may not have the required permissions for obtaining the bucket list. A further analysis is required to identify the root cause.
+obsutil cp obs://src-bucket obs://dst-bucket -f -r -crr
+./obsutil cp obs://src-bucket obs://dst-bucket -f -r -crr
+
When the -crr parameter is used, the source object's standard metadata, including Cache-Control, Expires, Content-Encoding, Content-Disposition, Content-Type, and Content-Language, will not be copied.
+When the -crr parameter is used for cross-region replication, the ACL of the source object will not be copied. You can use [-acl=xxx] to specify the ACL for the target object. If the ACL is not specified, the object inherits the ACL of the bucket by default.
+You can use this command to set the properties of a bucket, such as storage classes and access policies.
+obsutil chattri obs://bucket [-sc=xxx] [-acl=xxx] [-aclXml=xxx] [-config=xxx]+
./obsutil chattri obs://bucket [-sc=xxx] [-acl=xxx] [-aclXml=xxx] [-config=xxx]+
obsutil chattri obs://bucket-test -acl=private + +Start at 2024-09-29 07:58:46.0506904 +0000 UTC + +Set the acl of bucket [bucket-test] to [private] successfully, request id [04050000016836C5DA6FB21F14A2A0C0]+
Parameter + |
+Optional or Mandatory + |
+Description + |
+
|---|---|---|
bucket + |
+Mandatory + |
+The bucket name + |
+
sc + |
+Optional (additional parameter) + |
+The default storage class of the bucket. Possible values are: +
|
+
acl + |
+Optional (additional parameter) + |
+The predefined access control policy of the bucket. Possible values are: +
NOTE:
+The preceding three values indicate private read and write, public read, and public read and write. + |
+
aclXml + |
+Optional (additional parameter) + |
+The bucket's access control policy, in XML format +<AccessControlPolicy> + <Owner> + <ID>ownerid</ID> + </Owner> + <AccessControlList> + <Grant> + <Grantee> + <ID>userid</ID> + </Grantee> + <Permission>[WRITE|WRITE_ACP|READ|READ_ACP|FULL_CONTROL]</Permission> + </Grant> + <Grant> + <Grantee> + <Canned>Everyone</Canned> + </Grantee> + <Permission>[WRITE|WRITE_ACP|READ|READ_ACP|FULL_CONTROL]</Permission> + </Grant> + </AccessControlList> +</AccessControlPolicy>+ NOTE:
+
NOTICE:
+Because angle brackets (<) and (>) are unavoidably included in the parameter value, you must use quotation marks to enclose them for escaping when running the command. Use single quotation marks for Linux or macOS and double quotation marks for Windows. + |
+
bucket-cname + |
+Optional (additional parameter) + |
+The user-defined domain name bound to the bucket + NOTE:
+This parameter is only supported by obsutil 5.7.9 and later. + |
+
config + |
+Optional (additional parameter) + |
+The user-defined configuration file for executing the current command. For details about parameters that can be configured, see Configuration Parameters. + |
+
payer + |
+Optional (additional parameter) + |
+Specifies that requester pays is enabled. + |
+
Only one from sc, acl, or aclXml can be set for each command.
+You can use this command to set properties of an object or set properties of objects in batches by a specified object name prefix.
+
You can set storage classes only for buckets whose version is 3.0.
+obsutil chattri obs://bucket/key [-meta=aaa:bbb#ccc:ddd] [-sc=xxx] [-acl=xxx] [-aclXml=xxx] [-versionId=xxx] [-fr] [-o=xxx] [-config=xxx]+
obsutil chattri obs://bucket[/key] -r [-f] [-v] [-meta=aaa:bbb#ccc:ddd] [-sc=xxx] [-acl=xxx] [-aclXml=xxx] [-o=xxx] [-j=1] [-config=xxx]+
./obsutil chattri obs://bucket/key [-meta=aaa:bbb#ccc:ddd] [-sc=xxx] [-acl=xxx] [-aclXml=xxx] [-versionId=xxx] [-fr] [-o=xxx] [-config=xxx]+
./obsutil chattri obs://bucket[/key] -r [-f] [-v] [-meta=aaa:bbb#ccc:ddd] [-sc=xxx] [-acl=xxx] [-aclXml=xxx] [-o=xxx] [-j=1] [-config=xxx]+
obsutil chattri obs://bucket-test/key -acl=public-read +Start at 2024-09-30 08:17:15.5572914 +0000 UTC + +Set the acl of object [key] in the bucket [bucket-test] to [public-read] successfully, request id [04050000016836DDFA73B2B5320E2651]+
obsutil chattri obs://bucket-test -r -f -acl=public-read +Start at 2024-09-30 08:18:03.105373 +0000 UTC + +[------------------------------------------------] 100.00% tps:155.15 5/5 233ms +Succeed count: 5 Failed count: 0 +Metrics [max cost:177 ms, min cost:53 ms, average cost:102.40 ms, average tps:20.41] +Task id: 9d7f73ff-f747-4fdd-9b2a-815ba2dc3b07+
Parameter + |
+Optional or Mandatory + |
+Description + |
+
|---|---|---|
bucket + |
+Mandatory + |
+The name of the bucket to which an object belongs + |
+
key + |
+Mandatory when setting properties of an object. +Optional when setting properties of objects in batches. + |
+The name of the object whose properties are to be set, or the name prefix of objects whose properties are to be set in batches +If this parameter is left blank during batch operation, properties of all objects in the bucket are set. + |
+
meta + |
+Optional (additional parameter) + |
+The standard or user-defined metadata that can be specified for an object when setting properties of the object +
This parameter must be used together with direct. + |
+
direct + |
+Optional (additional parameter) + |
+The metadata operation indicator +The value can be: +
This parameter must be used together with meta. + |
+
sc + |
+Optional (additional parameter) + |
+The storage class of an object. Possible values are: +
For an object whose storage class is cold, restore the object first and then specify its storage class. To restore an object, see Restoring Objects from the Cold Storage. + |
+
acl + |
+Optional (additional parameter) + |
+The predefined access control policy of an object. Possible values are: +
|
+
aclXml + |
+Optional (additional parameter) + |
+The bucket's access control policy, in XML format. The format is as follows: +<AccessControlPolicy> + <Owner> + <ID>ownerid</ID> + </Owner> + <AccessControlList> + <Grant> + <Grantee> + <ID>userid</ID> + </Grantee> + <Permission>[WRITE|WRITE_ACP|READ|READ_ACP|FULL_CONTROL]</Permission> + </Grant> + <Grant> + <Grantee> + <Canned>Everyone</Canned> + </Grantee> + <Permission>[WRITE|WRITE_ACP|READ|READ_ACP|FULL_CONTROL]</Permission> + </Grant> + </AccessControlList> +</AccessControlPolicy>+
Because angle brackets (<) and (>) are unavoidably included in the parameter value, you must use quotation marks to enclose them for escaping when running the command. Use single quotation marks for Linux or macOS and double quotation marks for Windows. + |
+
versionId + |
+Optional when setting properties of an object (additional parameter) + |
+The version ID of the object whose properties are to be set + |
+
fr + |
+Optional when setting properties of an object (additional parameter) + |
+Generates an operation result file when setting properties of an object. + |
+
f + |
+Optional when setting properties of objects in batches (additional parameter) + |
+Runs in force mode. + |
+
r + |
+Mandatory when setting properties of objects in batches (additional parameter) + |
+Sets properties of objects in batches based on a specified object name prefix. + |
+
v + |
+Optional when setting properties of objects in batches (additional parameter) + |
+Sets properties of versions of objects in batches based on a specified object name prefix. + |
+
o + |
+Optional (additional parameter) + |
+The folder that stores the result files. After the command is executed, result files (including success and failure files) will be created in the specified folder. +The default value is .obsutil_output, a subfolder in the user's home directory where obsutil commands are executed. +
|
+
j + |
+Optional when setting properties of objects in batches (additional parameter) + |
+The maximum number of concurrent tasks for setting object properties in batches. The default value is the value of defaultJobs in the configuration file. + NOTE:
+The value is ensured to be greater than or equal to 1. + |
+
bucket-cname + |
+Optional (additional parameter) + |
+The user-defined domain name bound to the bucket + NOTE:
+This parameter is only supported by obsutil 5.7.9 and later. + |
+
config + |
+Optional (additional parameter) + |
+The user-defined configuration file for executing the current command. For details about parameters that can be configured, see Configuration Parameters. + |
+
payer + |
+Optional (additional parameter) + |
+Specifies that requester pays is enabled. + |
+
Only one from acl, sc, or aclXml can be set for each command.
+Refer to Response for uploading an object.
+You can use this command to synchronize all content in a local source path to the specified target OBS bucket to ensure data consistency. Incremental synchronization has the following meanings:
+
obsutil sync file_url obs://bucket[/key] [-arcDir=xxx] [-dryRun] [-link] [-vlength] [-vmd5] [-p=1] [-threshold=5248800] [-acl=xxx] [-sc=xxx] [-meta=aaa:bbb#ccc:ddd] [-ps=auto] [-o=xxx] [-cpd=xxx] [-fr] [-config=xxx]+
obsutil sync folder_url obs://bucket[/key] [-arcDir=xxx] [-dryRun] [-link] [-vlength] [-vmd5] [-j=1] [-p=1] [-threshold=52428800] [-acl=xxx] [-sc=xxx] [-meta=aaa:bbb#ccc:ddd] [-ps=auto] [-include=*.xxx] [-exclude=*.xxx] [-timeRange=time1-time2] [-at] [-mf] [-o=xxx] [-cpd=xxx] [-config=xxx]+
./obsutil sync file_url obs://bucket[/key] [-arcDir=xxx] [-dryRun] [-link] [-vlength] [-vmd5] [-p=1] [-threshold=5248800] [-acl=xxx] [-sc=xxx] [-meta=aaa:bbb#ccc:ddd] [-ps=auto] [-o=xxx] [-cpd=xxx] [-fr] [-config=xxx]+
./obsutil sync folder_url obs://bucket[/key] [-arcDir=xxx] [-dryRun] [-link] [-vlength] [-vmd5] [-j=1] [-p=1] [-threshold=52428800] [-acl=xxx] [-sc=xxx] [-meta=aaa:bbb#ccc:ddd] [-ps=auto] [-include=*.xxx] [-exclude=*.xxx] [-timeRange=time1-time2] [-at] [-mf] [-o=xxx] [-cpd=xxx] [-config=xxx]+
obsutil sync d:\temp\test.txt obs://bucket-test/key + +Start at 2024-09-25 04:48:10.1147483 +0000 UTC + +Parallel: 5 Jobs: 5 +Threshold: 50.00MB PartSize: auto +VerifyLength: false VerifyMd5: false +CheckpointDir: C:\Users\Administrator\.obsutil_checkpoint + +[====================================================] 100.00% 1.68 MB/s 8.46MB/8.46MB 5s +Upload successfully, 8.46MB, d:\temp\test.txt --> obs://bucket-test/key, cost [55], status [200], request id [00000192421F4E224012B8470C0CCCDC]+
obsutil sync d:\temp obs://bucket-test/temp + +Start at 2024-09-25 04:48:10.1147483 +0000 UTC + +Parallel: 5 Jobs: 5 +Threshold: 50.00MB PartSize: auto +VerifyLength: false VerifyMd5: false +CheckpointDir: C:\Users\Administrator\.obsutil_checkpoint +Task id: 104786c8-27c2-48fc-bc6a-5886596fb0ed + +OutputDir: C:\Users\Administrator\.obsutil_output + +[========================================================] 100.00% tps:35.71 2.02 KB/s 7.20MB/7.20MB 0s +Succeed count: 5 Failed count: 0 +Succeed bytes: xxxx +Metrics [max cost:90 ms, min cost:45 ms, average cost:63.80 ms, average tps:35.71, transferred size: 7.20MB] +Task id: 104786c8-27c2-48fc-bc6a-5886596fb0ed+
Parameter + |
+Optional or Mandatory + |
+Description + |
+
|---|---|---|
file_url + |
+Mandatory for uploading a file synchronously + |
+The local file path + |
+
folder_url + |
+Mandatory for uploading a folder synchronously + |
+The local folder path + |
+
bucket + |
+Mandatory + |
+The bucket name + |
+
key + |
+Optional + |
+The object name or object name prefix specified when uploading a file synchronously, or the object name prefix specified when uploading a folder synchronously +The rules are as follows: +
NOTE:
+
|
+
fr + |
+Optional for synchronously uploading a file (additional parameter) + |
+Generates an operation result file when synchronously uploading a file. + |
+
arcDir + |
+Optional (additional parameter) + |
+The path to which the synchronously uploaded files are archived + |
+
dryRun + |
+Optional (additional parameter) + |
+Conducts a dry run. + |
+
link + |
+Optional (additional parameter) + |
+The actual path of a symbolic link for a file or folder + NOTICE:
+
|
+
vlength + |
+Optional (additional parameter) + |
+After the synchronous upload is complete, checks whether the sizes of the objects in the bucket are the same as those of the local files. + |
+
vmd5 + |
+Optional (additional parameter) + |
+After the synchronous upload is complete, checks whether the MD5 values of the objects in the bucket are the same as those of the local files. + NOTE:
+
CAUTION:
+If your object needs encryption, do not use this parameter. + |
+
p + |
+Optional (additional parameter) + |
+The maximum number of concurrent multipart upload tasks when uploading a file. The default value is the value of defaultParallels in the configuration file. + |
+
threshold + |
+Optional (additional parameter) + |
+The threshold for enabling multipart upload, in bytes. The default value is the value of defaultBigfileThreshold in the configuration file. + NOTE:
+
|
+
acl + |
+Optional (additional parameter) + |
+The access control policies that can be specified when synchronously uploading files. Possible values are: +
NOTE:
+The preceding four values indicate private read and write, public read, public read and write, and bucket owner full control. + |
+
sc + |
+Optional (additional parameter) + |
+The storage classes of objects that can be specified when synchronously uploading files. Possible values are: +
|
+
meta + |
+Optional (additional parameter) + |
+The customized metadata that can be specified when uploading files. The format is key1:value1#key2:value2#key3:value3. + NOTE:
+The preceding value indicates that the object in the bucket contains three groups of customized metadata after the file is uploaded: key1:value1, key2:value2, and key3:value3. + |
+
ps + |
+Optional (additional parameter) + |
+The size of each part in a multipart upload task, in bytes. The value ranges from 100KB to 5GB. The default value is the value of defaultPartSize in the configuration file. + NOTE:
+
|
+
cpd + |
+Optional (additional parameter) + |
+The folder where the part records reside. The default value is .obsutil_checkpoint, the subfolder in the home directory of the user who executes obsutil commands. + NOTE:
+A part record is generated during a multipart upload and saved to the upload subfolder. After the upload succeeds, its part record is deleted automatically. If the upload fails or is suspended, the system attempts to resume the task according to its part record when you perform the upload the next time. + |
+
j + |
+Optional for synchronously uploading a folder (additional parameter) + |
+The maximum number of concurrent tasks for uploading a folder synchronously. The default value is the value of defaultJobs in the configuration file. + NOTE:
+The value is ensured to be greater than or equal to 1. + |
+
exclude + |
+Optional for synchronously uploading a folder (additional parameter) + |
+The file matching patterns that are excluded, for example: *.txt + NOTE:
+
NOTICE:
+
|
+
include + |
+Optional for synchronously uploading a folder (additional parameter) + |
+The file matching patterns that are included, for example: *.jpg + NOTE:
+
NOTICE:
+
|
+
at + |
+Optional for synchronously uploading a folder (additional parameter) + |
+Indicates that when synchronously uploading a folder, only the files whose latest access time is within the value of timeRange are uploaded. + NOTE:
+
|
+
disableDirObject + |
+Optional for synchronously uploading folders (additional parameter) + |
+Indicates the folders themselves are not uploaded as an object. Configuring this parameter can avoid uploading empty folders to a bucket. If a folder contains files, the files will be uploaded and the original path format is retained. + |
+
timeRange + |
+Optional for synchronously uploading a folder (additional parameter) + |
+The time range matching pattern when synchronously uploading files. Only files whose latest modification time is within the configured time range are uploaded. +This pattern has a lower priority than the file matching patterns (exclude/include). That is, the time range matching pattern is executed after the configured file matching patterns. + NOTE:
+
NOTICE:
+Time in the matching pattern is the UTC time. + |
+
mf + |
+Optional (additional parameter) + |
+Indicates that the name matching pattern (include or exclude) and the time matching pattern (timeRange) also take effect on folders. + + |
+
o + |
+Optional (additional parameter) + |
+The folder that stores the result files. After the command is executed, result files (possibly success, failure, and warning files) will be created in the specified folder. The default value is .obsutil_output, a subfolder in the user's home directory where obsutil commands are executed. + NOTE:
+
|
+
config + |
+Optional (additional parameter) + |
+The user-defined configuration file for executing the current command. For details about parameters that can be configured, see Configuration Parameters. + |
+
Refer to Response for uploading an object.
+You can use this command to synchronize all objects in a specified path of the source OBS bucket to a target local path to ensure data consistency. Incremental synchronization has the following meanings:
+
obsutil sync obs://bucket[/key] folder_url [-tempFileDir=xxx] [-dryRun] [-vlength] [-vmd5] [-j=1] [-p=1] [-threshold=52428800] [-ps=auto] [-include=*.xxx] [-exclude=*.xxx] [-timeRange=time1-time2] [-mf] [-o=xxx] [-cpd=xxx] [-config=xxx]+
./obsutil sync obs://bucket[/key] folder_url [-tempFileDir=xxx] [-dryRun] [-vlength] [-vmd5] [-j=1] [-p=1] [-threshold=52428800] [-ps=auto] [-include=*.xxx] [-exclude=*.xxx] [-timeRange=time1-time2] [-mf] [-o=xxx] [-cpd=xxx] [-config=xxx]+
obsutil sync obs://bucket-test/temp d:\temp +Start at 2024-09-30 08:53:22.327072 +0000 UTC + +Parallel: 5 Jobs: 5 +Threshold: 50.00MB PartSize: auto +VerifyLength: false VerifyMd5: false +CheckpointDir: xxxx + +Task id: 3066a4b0-4d21-4929-bb84-4829c32cbd0f +OutputDir: xxxx +TempFileDir: xxxx + +[======================================================] 100.00% tps:17.86 155.59 KB/s 7.20MB/7.20MB 0s +Succeed count: 6 Failed count: 0 +Succeed bytes: xxxx +Metrics [max cost:153 ms, min cost:129 ms, average cost:92.00 ms, average tps:17.86, transferred size: 7.20MB] + +Task id: 3066a4b0-4d21-4929-bb84-4829c32cbd0f+
Parameter + |
+Optional or Mandatory + |
+Description + |
+
|---|---|---|
folder_url + |
+Mandatory + |
+The local folder path + |
+
bucket + |
+Mandatory + |
+The bucket name + |
+
key + |
+Optional + |
+The name prefix of objects to be synchronously downloaded +The rules are as follows: +
NOTE:
+
|
+
tempFileDir + |
+Optional (additional parameter) + |
+The directory for storing temporary files during synchronous download. The default value is the value of defaultTempFileDir in the configuration file. + NOTE:
+
|
+
dryRun + |
+Optional (additional parameter) + |
+Conducts a dry run. + |
+
vlength + |
+Optional (additional parameter) + |
+Checks whether the sizes of the local files are the same as those of the objects in the bucket after the download is complete. + |
+
vmd5 + |
+Optional (additional parameter) + |
+Checks whether MD5 values of the local files are the same as those of the objects in the bucket after the download is complete. + NOTE:
+Objects in the bucket must contain metadata x-obs-meta-md5chksum, or MD5 verification will be skipped. + CAUTION:
+If your object needs encryption, do not use this parameter. + |
+
p + |
+Optional (additional parameter) + |
+The maximum number of concurrent multipart download tasks when downloading an object. The default value is the value of defaultParallels in the configuration file. + |
+
threshold + |
+Optional (additional parameter) + |
+The threshold for enabling multipart download, in bytes. The default value is the value of defaultBigfileThreshold in the configuration file. + NOTE:
+
|
+
ps + |
+Optional (additional parameter) + |
+The size of each part in a multipart download task, in bytes. The default value is the value of defaultPartSize in the configuration file. + NOTE:
+
|
+
cpd + |
+Optional (additional parameter) + |
+The folder where the part records reside. The default value is .obsutil_checkpoint, the subfolder in the home directory of the user who executes obsutil commands. + NOTE:
+A part record is generated during a multipart download and saved to the down subfolder. After the download succeeds, its part record is deleted automatically. If the download fails or is suspended, the system attempts to resume the task according to its part record when you perform the download the next time. + |
+
j + |
+Optional for downloading objects in batches (additional parameter) + |
+The maximum number of concurrent tasks for downloading objects synchronously. The default value is the value of defaultJobs in the configuration file. + NOTE:
+The value is ensured to be greater than or equal to 1. + |
+
exclude + |
+Optional for downloading objects in batches (additional parameter) + |
+The matching patterns of source objects that are excluded, for example: *.txt + NOTE:
+
NOTICE:
+
|
+
include + |
+Optional for downloading objects in batches (additional parameter) + |
+The matching patterns of source objects that are included, for example: *.jpg + NOTE:
+
NOTICE:
+
|
+
timeRange + |
+Optional (additional parameter) + |
+The time range matching pattern when synchronously downloading objects. Only objects whose latest modification time is within the configured time range are downloaded. +This pattern has a lower priority than the object matching patterns (exclude/include). That is, the time range matching pattern is executed after the configured object matching patterns. + NOTE:
+
NOTICE:
+
|
+
mf + |
+Optional (additional parameter) + |
+Indicates that the name matching pattern (include or exclude) and the time matching pattern (timeRange) also take effect on objects whose names end with a slash (/). + + |
+
o + |
+Optional (additional parameter) + |
+The folder that stores the result files. After the command is executed, result files (possibly success, failure, and warning files) will be created in the specified folder. The default value is .obsutil_output, a subfolder in the user's home directory where obsutil commands are executed. + NOTE:
+
|
+
config + |
+Optional (additional parameter) + |
+The user-defined configuration file for executing the current command. For details about parameters that can be configured, see Configuration Parameters. + |
+
Refer to Response for uploading an object.
+You can use this command to synchronize all objects in a specified path of the source bucket to a specified path in the target bucket to ensure data consistency. Incremental synchronization has the following meanings:
+
obsutil sync obs://srcbucket[/key] obs://dstbucket[/dest] [-dryRun] [-crr] [-vlength] [-vmd5] [-j=1] [-p=1] [-threshold=52428800] [-acl=xxx] [-sc=xxx] [-meta=aaa:bbb#ccc:ddd] [-ps=auto] [-include=*.xxx] [-exclude=*.xxx] [-timeRange=time1-time2] [-mf] [-o=xxx] [-cpd=xxx] [-config=xxx]+
./obsutil sync obs://srcbucket[/key] obs://dstbucket[/dest] [-dryRun] [-crr] [-vlength] [-vmd5] [-j=1] [-p=1] [-threshold=52428800] [-acl=xxx] [-sc=xxx] [-meta=aaa:bbb#ccc:ddd] [-ps=auto] [-include=*.xxx] [-exclude=*.xxx] [-timeRange=time1-time2] [-mf] [-o=xxx] [-cpd=xxx] [-config=xxx]+
The source path and destination path cannot be the same or nested when synchronously copying objects.
+obsutil sync obs://bucket-test/temp/ obs://bucket-test2/temp + +Start at 2024-09-25 04:48:10.1147483 +0000 UTC + +Parallel: 5 Jobs: 5 +Threshold: 50.00MB PartSize: auto +CheckpointDir: C:\Users\Administrator\.obsutil_checkpoint + +Task id: 104786c8-27c2-48fc-bc6a-5886596fb0e +OutputDir: C:\Users\Administrator\.obsutil_output + +[=============================================================] 100.00% 10/s 0s +Succeed count: 5 Failed count: 0 +Metrics [max cost:298 ms, min cost:192 ms, average cost:238.00 ms, average tps:9.71, transferred size: 7.20MB] +Task id: 0476929d-9d23-4dc5-b2f8-0a0493f027c5+
Parameter + |
+Optional or Mandatory + |
+Description + |
+
|---|---|---|
srcbucket + |
+Mandatory + |
+The source bucket name + |
+
dstbucket + |
+Mandatory + |
+The destination bucket name + |
+
dest + |
+Optional + + |
+The name prefix of destination objects + NOTE:
+If the value of this parameter does not end with a slash (/), the obsutil tool automatically adds a slash (/) at the end of the configured value as the name prefix of destination objects. + |
+
key + |
+Optional + |
+The name prefix of source objects +The rules are as follows: +
NOTE:
+
|
+
dryRun + |
+Optional (additional parameter) + |
+Conducts a dry run. + |
+
crr + |
+Optional (additional parameter) + |
+Enables the client-side cross-region replication function. In this mode, data is directly copied to the destination bucket from the source bucket through data stream. The buckets can be any two OBS buckets. + NOTE:
+
NOTICE:
+When cross-region replication is enabled, the upload/download bandwidth, CPU, and memory resources of the host where commands are executed will be occupied, which may deteriorate the host performance. + |
+
vlength + |
+Optional (additional parameter) + |
+Verifies whether the object size in the destination bucket is the same as that in the source bucket after the copy task completes. + NOTE:
+This parameter must be used together with crr. + |
+
vmd5 + |
+Optional (additional parameter) + |
+Verifies whether the MD5 value of the destination bucket is the same as that of the source bucket after the copy task completes. + NOTE:
+
CAUTION:
+If your object needs encryption, do not use this parameter. + |
+
p + |
+Optional (additional parameter) + |
+The maximum number of concurrent multipart copy tasks when copying an object. The default value is the value of defaultParallels in the configuration file. + CAUTION:
+For an inter-bucket replication task that does not include the crr parameter, the maximum allowable value for this parameter is 10,000. + |
+
threshold + |
+Optional (additional parameter) + |
+The threshold for enabling multipart copy, in bytes. The default value is the value of defaultBigfileThreshold in the configuration file. + NOTE:
+
|
+
acl + |
+Optional (additional parameter) + |
+The access control policies for destination objects that can be specified when copying objects. Possible values are: +
NOTE:
+The preceding four values indicate private read and write, public read, public read and write, and bucket owner full control. + |
+
sc + |
+Optional (additional parameter) + |
+The storage classes of the destination objects that can be specified when copying objects. Possible values are: +
|
+
meta + |
+Optional (additional parameter) + |
+The metadata of destination objects that can be specified when copying objects. This parameter should be configured in the following format: key1:value1#key2:value2#key3:value3. + NOTE:
+The format example above indicates that the destination objects contain three groups of custom metadata: key1:value1, key2:value2, and key3:value3. + |
+
ps + |
+Optional (additional parameter) + |
+The size of each part in a multipart copy task, in bytes. The value ranges from 100KB to 5GB. The default value is the value of defaultPartSize in the configuration file. + NOTE:
+
|
+
cpd + |
+Optional (additional parameter) + |
+The folder where the part records reside. The default value is .obsutil_checkpoint, the subfolder in the home directory of the user who executes obsutil commands. + NOTE:
+A part record is generated during a multipart copy and saved to the copy subfolder. After the copy succeeds, its part record is deleted automatically. If the copy fails or is suspended, the system attempts to resume the task according to its part record when you perform the copy the next time. + |
+
j + |
+Optional for copying objects in batches (additional parameter) + |
+The maximum number of concurrent tasks for copying objects synchronously. The default value is the value of defaultJobs in the configuration file. + CAUTION:
+For an inter-bucket replication task that does not include the crr parameter, the maximum allowable value for this parameter is 10,000. + NOTE:
+The value is ensured to be greater than or equal to 1. + |
+
exclude + |
+Optional for copying objects in batches (additional parameter) + |
+The matching patterns of source objects that are excluded, for example, *.txt + NOTE:
+
NOTICE:
+
|
+
include + |
+Optional for copying objects in batches (additional parameter) + |
+The matching patterns of source objects that are included, for example: *.jpg + NOTE:
+
NOTICE:
+
|
+
timeRange + |
+Optional (additional parameter) + |
+The time range matching pattern when synchronously copying objects. Only objects whose latest modification time is within the configured time range are copied. +This pattern has a lower priority than the object matching patterns (exclude/include). That is, the time range matching pattern is executed after the configured object matching patterns. + NOTE:
+
NOTICE:
+
|
+
mf + |
+Optional (additional parameter) + |
+Indicates that the name matching pattern (include or exclude) and the time matching pattern (timeRange) also take effect on objects whose names end with a slash (/). + + |
+
o + |
+Optional (additional parameter) + |
+The folder that stores the result files. After the command is executed, result files (possibly success, failure, and warning files) will be created in the specified folder. The default value is .obsutil_output, a subfolder in the user's home directory where obsutil commands are executed. + NOTE:
+
|
+
config + |
+Optional (additional parameter) + |
+The user-defined configuration file for executing the current command. For details about parameters that can be configured, see Configuration Parameters. + |
+
Refer to Response for uploading an object.
+You can use this command to archive log files to a local PC or to a specified bucket.
+obsutil archive [file_or_folder_url] [-config=xxx]+
obsutil archive obs://bucket[/key] [-config=xxx]+
obsutil archive [file_or_folder_url] [-config=xxx]+
obsutil archive obs://bucket[/key] [-config=xxx]+
obsutil archive + +[----------------------------------------------------------] 100.00% 15/15 35ms +Succeed to archive log files to [D:\obsutil\obsutil_log.zip]+
Parameter + |
+Optional or Mandatory + |
+Description + |
+
|---|---|---|
file_or_folder_url + |
+Optional + |
+The path to which log files are archived. The rules are as follows: +
NOTE:
+All archive files are .zip files. + |
+
bucket + |
+Mandatory for archiving log files to a specified bucket + |
+The bucket name + |
+
key + |
+Optional for archiving log files to a specified bucket + |
+The object name or object name prefix when archiving log files to a specified bucket +The rules are as follows: +
|
+
config + |
+Optional (additional parameter) + |
+The user-defined configuration file for executing a command. For details about parameters that can be configured, see Configuration Parameters. + |
+
All commands in this section use the Linux operating system as an example to describe how to perform synchronous upload operations.
+Assume that a local folder is in the following structure:
+└── src1 + ├── src2 + ├── test1.txt + └── test2.txt + ├── src3 + └── test3.txt+
Assume that bucket bucket-test contains the following objects:
+obs://bucket-test/src1/ +obs://bucket-test/src1/src2/ +obs://bucket-test/src1/src2/test1.txt +obs://bucket-test/src1/src3/+
Based on the structure of the preceding local folder and objects in the bucket, different synchronous upload scenarios require different commands.
+./obsutil sync /src1/test3.txt obs://bucket-test+
After the synchronization is successful, the test3.txt file is directly uploaded to the bucket because there is no test3.txt in bucket bucket-test. Then, objects in the bucket are as follows:
+obs://bucket-test/test3.txt +obs://bucket-test/src1/ +obs://bucket-test/src1/src2/ +obs://bucket-test/src1/src2/test1.txt +obs://bucket-test/src1/src3/+
./obsutil sync /src1 obs://bucket-test/src1+
After the synchronization, the objects in the bucket are as follows:
+obs://bucket-test/src1/ +obs://bucket-test/src1/test3.txt +obs://bucket-test/src1/src2/ +obs://bucket-test/src1/src2/test1.txt +obs://bucket-test/src1/src2/test2.txt +obs://bucket-test/src1/src3/+
All commands in this section use the Linux operating system as an example to describe how to perform synchronous download operations.
+Assume that bucket bucket-test contains the following objects:
+obs://bucket-test/src1/ +obs://bucket-test/src1/test3.txt +obs://bucket-test/src1/src2/ +obs://bucket-test/src1/src2/test1.txt +obs://bucket-test/src1/src2/test2.txt +obs://bucket-test/src1/src3/+
Assume that a local folder is in the following structure:
+└── src1 + └── test3.txt+
Based on the structure of the preceding local folder and objects in the bucket, different synchronous download scenarios require different commands.
+./obsutil sync obs://bucket-test/src1 /src1+
After the synchronization is successful, the following files are generated in the local src1 folder:
+└── src1 + ├── src2 + ├── test1.txt + └── test2.txt + ├── src3 + └── test3.txt+
All commands in this section use the Linux operating system as an example to describe how to perform synchronous copy operations.
+Assume that the source bucket bucket-src contains the following objects:
+obs://bucket-src/src1/ +obs://bucket-src/src1/test3.txt +obs://bucket-src/src1/src2/ +obs://bucket-src/src1/src2/test1.txt +obs://bucket-src/src1/src2/test2.txt +obs://bucket-src/src1/src3/+
Assume that the destination bucket bucket-dest contains the following objects:
+obs://bucket-dest/src1/ +obs://bucket-dest/src1/test3.txt+
Based on the structure of objects in the bucket, different synchronous copy scenarios require different commands.
+./obsutil sync obs://bucket-src/src1 obs://bucket-dest/src1+
After the synchronous copy is complete, the objects in the destination bucket bucket-dest are as follows:
+obs://bucket-dest/src1/ +obs://bucket-dest/src1/test3.txt +obs://bucket-dest/src1/src2/ +obs://bucket-dest/src1/src2/test1.txt +obs://bucket-dest/src1/src2/test2.txt +obs://bucket-dest/src1/src3/+
Because obsutil is external software, you need to access the directory where obsutil resides before running obsutil commands, which is not convenient.
+An OS provides built-in commands so that the command-dependent directories are loaded to the memory when the system is started. In this way, you can run the commands in any directory, which improves the tool's usability.
+This section introduces how to set obsutil commands as built-in commands in different OSs.
+
PATH indicates the operation path selected in step 1. OBSUTIL_PATH indicates the absolute path of obsutil.exe.
+mkdir /obsutil+
chmod 755 /obsutil+
cp /home/test/obsutil /obsutil +chmod 711 /obsutil/obsutil+
Skip this step if the new line already exists in the /etc/profile file.
+The .obsutilconfig file in the same directory where obsutil commands reside is the configuration file of the obsutil tool. You can also run the obsutil config command to obtain the configuration file path. An example is provided as follows:
+obsutil config +Config file url: + D:\tools\.obsutilconfig+
where obsutil +E:\tools\bin\obsutil.exe+
del E:\tools\bin\obsutil.exe+
Replace PATH with the path of obsutil commands. E:\tools\bin\obsutil.exe is used in the preceding example.
+which obsutil +/obsutil/obsutil+
rm -rf /obsutil/obsutil+
Replace PATH with the path of obsutil commands. /obsutil/obsutil is used in the preceding example.
+
If the /etc/profile file contains line export PATH=$PATH:/obsutil, delete the line. Or if the file contains line export PATH=$PATH:/test/bin:/obsutil:/test1, delete :/obsutil from the line.
+
In the Ubuntu OS, if you run the useradd command to add a user, the home directory of the user is not created by default. You need to create it manually. Therefore, you are advised to run the adduser command to add a user.
+If you have properly configured sdkLogPath and utilLogPath in the configuration file, but still no log file is generated after command execution, then check whether the user who runs the command has the read and write permissions on sdkLogPath and utilLogPath.
+You can use this command to create a folder in a specified bucket or local file system.
+
No error is returned if a folder with the same name as an existing one is created, and the content of the existing folder remains unchanged.
+obsutil mkdir obs://bucket/folder[/subfolder1/subfolder2] [-config=xxx]+
obsutil mkdir folder_url [-config=xxx]+
./obsutil mkdir obs://bucket/folder[/subfolder1/subfolder2] [-config=xxx]+
./obsutil mkdir folder_url [-config=xxx]+
obsutil mkdir obs://bucket-test/folder1/folder2 + +The bucket [bucket-test] does not support POSIX, create folder(s) step by step +Create folder [obs://bucket-test/folder1/] successfully, request id [0000016979E1D23C860BB3D8E4577C5E] +Create folder [obs://bucket-test/folder1/folder2] successfully, request id [0000016979E1D2B2860BB5181229C72C]+
Parameter + |
+Optional or Mandatory + |
+Description + |
+
|---|---|---|
bucket + |
+Mandatory when creating a folder in a specified bucket + |
+The bucket name + |
+
folder + |
+Mandatory when creating a folder in a specified bucket + |
+The folder path in the bucket. This value can contain multi-level folders. Separate each level with a slash (/). + |
+
folder_url + |
+Mandatory when creating a folder in the local file system + |
+The folder path in the local file system. The value can be an absolute path or a relative path. + |
+
bucket-cname + |
+Optional (additional parameter) + |
+The user-defined domain name bound to the bucket + NOTE:
+This parameter is only supported by obsutil 5.7.9 and later. + |
+
config + |
+Optional (additional parameter) + |
+The user-defined configuration file for executing the current command. For details about parameters that can be configured, see Configuration Parameters. + |
+
payer + |
+Optional (additional parameter) + |
+Specifies that requester pays is enabled. + |
+
You can use this command to generate the download link of a specified object in a bucket or generate the download links of objects in a bucket in batches by object name prefix.
+obsutil sign obs://bucket/key [-e=300] [-config=xxx]+
obsutil sign obs://bucket[/key] -r [-e=300] [-timeRange=time1-time2] [-include=*.xxx] [-exclude=*.xxx] [-o=xxx] [-config=xxx]+
./obsutil sign obs://bucket/key [-e=300] [-config=xxx]+
./obsutil sign obs://bucket[/key] -r [-e=300] [-timeRange=time1-time2] [-include=*.xxx] [-exclude=*.xxx] [-o=xxx] [-config=xxx]+
obsutil sign obs://bucket-test/test.txt + +Download url of [obs://bucket-test/test.txt] is: + http://your-endpoint/bucket-test/test.txt?AccessKeyId=xxxx&Expires=1552548758&Signature=xxxx+
obsutil sign obs://bucket-test/test/ -r + +Generate download urls for objects . + +Generate the download url(s) for the objects in the bucket [bucket-test] finished +Task id: af4dc692-6a88-4541-8156-ff1a889d2288+
Parameter + |
+Optional or Mandatory + |
+Description + |
+
|---|---|---|
bucket + |
+Mandatory + |
+The bucket name + |
+
key + |
+Optional + |
+The object name used for generating the download link of a single object, or object name prefix used for generating download links of objects in batches + |
+
e + |
+Optional (additional parameter) + |
+The validity period of the generated download links of objects, in seconds. Minimum value: 60s. Default value: 300s + |
+
r + |
+Mandatory when generating download links of objects in batches (additional parameter) + |
+Generates the download links of objects in batches by a specified object name prefix. + |
+
exclude + |
+Optional when generating download links of objects in batches (additional parameter) + |
+The matching patterns of objects that are excluded, for example: *.txt + NOTE:
+
NOTICE:
+
|
+
include + |
+Optional when generating download links of objects in batches (additional parameter) + |
+The matching patterns of objects that are included, for example: *.jpg + NOTE:
+
NOTICE:
+
|
+
timeRange + |
+Optional (additional parameter) + |
+The time range matching pattern when generating download links of objects. Only the download links of objects whose latest modification time is within the configured time range are generated. +This pattern has a lower priority than the object matching patterns (exclude/include). That is, the time range matching pattern is executed after the configured object matching patterns. + NOTE:
+
|
+
o + |
+Optional when generating download links of objects in batches (additional parameter) + |
+The folder that stores the result files. After the command is executed, result files (possibly success and failure files) will be created in the specified folder. The default value is .obsutil_output, a subfolder in the user's home directory where obsutil commands are executed. + NOTE:
+
|
+
config + |
+Optional (additional parameter) + |
+The user-defined configuration file for executing the current command. For details about parameters that can be configured, see Configuration Parameters. + |
+
payer + |
+Optional (additional parameter) + |
+Specifies that requester pays is enabled. + |
+
By default, obsutil uploads, downloads, and copies files or objects whose size is greater than 50 MB in multiple parts. Table 1 details related parameters in the .obsutilconfig file.
+ +Parameter + |
+Description + |
+
|---|---|
defaultBigfileThreshold + |
+Indicates the threshold for triggering multipart tasks, in bytes. If the size of a file to be uploaded, downloaded, or copied is greater than the threshold, the file is uploaded, downloaded, or copied in multiple parts. The default value is 50MB. + |
+
defaultPartSize + |
+Size of each part, in bytes. The default value is auto. + NOTE:
+
|
+
defaultParallels + |
+Maximum number of concurrent tasks in the multipart mode. The default value is 5. + |
+
Generally, multipart tasks not only speed up transmission but also allow you to resume failed tasks. By default, the part size of a multipart task can be automatically adjusted by the obsutil in the auto mode. In practice, however, to further improve the upload and download performance, you can adjust the part size according to the file size and the network conditions, to obtain the maximum transmission efficiency and ensure the successful completion of a transmission task.
+Adjust the number of concurrent tasks in the multipart mode according to the following formula:
+defaultParallels = Min(Number of CPUs x 2, Object size/defaultPartSize x 1.5)
+ +In the upload, download, and copy commands, parameters -p and -ps are used to modify the number of concurrent tasks in the multipart mode and part size respectively, and then deliver the multipart task based on the parameter values configured in the command. The default values in the configuration file are used if you do not set them in a command.
+Adjust the number of concurrent tasks in the multipart mode according to the following formula:
+p = Min(Number of CPUs x 2, Object size/ps x 1.5)
+ +For batch upload and download tasks, adjust the maximum number of concurrent tasks in a multipart upload, indicated by the parameter defaultJobs (-j), for better performance.
+If you have a large number of small files (each is usually several MB) to be uploaded or downloaded, set defaultJobs (-j) to a larger value for better performance. In this case, adjusting defaultParallels (-p) and defaultPartSize (-ps) may be ineffective.
+If you want to upload or download large files, set defaultParallels (-p) and defaultPartSize (-ps) to a larger value for better performance. However, if there are too many concurrent tasks (calculated from defaultJobs x defaultParallels), the upload and download performance may deteriorate because of resource switchover and preemption between threads, and some tasks may fail due to network fluctuations.
+
You can use this command to move a single object or move objects in batches by a specified object name prefix.
+
obsutil mv obs://srcbucket/key obs://dstbucket/[dest] [-dryRun] [-u] [-p=1] [-threshold=52428800] [-versionId=xxx] [-acl=xxx] [-sc=xxx] [-meta=aaa:bbb#ccc:ddd] [-ps=auto] [-cpd=xxx] [-fr] [-o=xxx] [-config=xxx]+
obsutil mv obs://srcbucket[/key] obs://dstbucket[/dest] -r [-dryRun] [-f] [-flat] [-u] [-j=1] [-p=1] [-threshold=52428800] [-acl=xxx] [-sc=xxx] [-meta=aaa:bbb#ccc:ddd] [-ps=auto] [-include=*.xxx] [-exclude=*.xxx] [-timeRange=time1-time2] [-mf] [-o=xxx] [-cpd=xxx] [-config=xxx]+
./obsutil mv obs://srcbucket/key obs://dstbucket/[dest] [-dryRun] [-u] [-p=1] [-threshold=52428800] [-versionId=xxx] [-acl=xxx] [-sc=xxx] [-meta=aaa:bbb#ccc:ddd] [-ps=auto] [-cpd=xxx] [-fr] [-o=xxx] [-config=xxx]+
./obsutil mv obs://srcbucket[/key] obs://dstbucket[/dest] -r [-dryRun] [-f] [-flat] [-u] [-j=1] [-p=1] [-threshold=52428800] [-acl=xxx] [-sc=xxx] [-meta=aaa:bbb#ccc:ddd] [-ps=auto] [-include=*.xxx] [-exclude=*.xxx] [-timeRange=time1-time2] [-mf] [-o=xxx] [-cpd=xxx] [-config=xxx]+
obsutil mv obs://bucket-test/key obs://bucket-test2 +Start at 2024-09-30 08:36:01.3934921 +0000 UTC + +Parallel: 5 Jobs: 5 +Threshold: 50.00MB PartSize: auto +CheckpointDir: xxxx + +[=====================================================] 100.00% 6/s 0s +Waiting for the copied key to be completed on server side. + +Move successfully, 19B, obs://bucket-test/key --> obs://bucket-test2/key, cost [1815], status [200], request id [00000192421282AC401423183A8B83A1]+
obsutil mv obs://bucket-test/temp/ obs://bucket-test2 -f -r +Start at 2024-09-30 08:37:32.2454905 +0000 UTC + +Parallel: 5 Jobs: 5 +Threshold: 50.00MB PartSize: auto +CheckpointDir: xxxx +Task id: 0476929d-9d23-4dc5-b2f8-0a0493f027c5 +OutputDir: xxxx + +[=============================================================] 100.00% 10/s 0s +Succeed count: 5 Failed count: 0 +Metrics [max cost:298 ms, min cost:192 ms, average cost:238.00 ms, average tps:9.71, transferred size: 7.20MB] +Task id: 0476929d-9d23-4dc5-b2f8-0a0493f027c5+
Parameter + |
+Optional or Mandatory + |
+Description + |
+
|---|---|---|
srcbucket + |
+Mandatory + |
+The source bucket name + |
+
dstbucket + |
+Mandatory + |
+The destination bucket name + |
+
dest + |
+Optional + |
+The destination object name when moving a single object, or the name prefix of destination objects when moving objects in batches + |
+
key + |
+Mandatory for moving a single object +Optional for moving objects in batches + |
+The source object name when moving a single object, or the name prefix of source objects when moving objects in batches +The rules are as follows: +
NOTE:
+
|
+
fr + |
+Optional for moving an object (additional parameter) + |
+Generates an operation result file when moving an object. + |
+
flat + |
+Optional for moving objects in batches (additional parameter) + |
+The name prefix of the parent object is excluded when moving objects in batches. + |
+
dryRun + |
+Optional (additional parameter) + |
+Conducts a dry run. + |
+
u + |
+Optional (additional parameter) + |
+Indicates incremental move. If this parameter is set, each object can be moved only when it does not exist in the destination bucket, its size is different from the namesake one in the destination bucket, or it has the latest modification time. + NOTE:
+If the size and modification time of the destination object are the same as those of the source object, the source object is directly deleted instead of being moved. + |
+
p + |
+Optional (additional parameter) + |
+The maximum number of concurrent multipart move tasks when moving an object. The default value is the value of defaultParallels in the configuration file. + |
+
threshold + |
+Optional (additional parameter) + |
+The threshold for enabling multipart move, in bytes. The default value is the value of defaultBigfileThreshold in the configuration file. + NOTE:
+
|
+
versionId + |
+Optional for moving an object (additional parameter) + |
+The source object version ID that can be specified when moving a single object + NOTE:
+Parameter versionId cannot be configured for buckets that support POSIX. + |
+
acl + |
+Optional (additional parameter) + |
+The access control policies for destination objects that can be specified when moving objects. Possible values are: +
NOTE:
+The preceding four values indicate private read and write, public read, public read and write, and bucket owner full control. + |
+
sc + |
+Optional (additional parameter) + |
+The storage classes of the destination objects that can be specified when moving objects. Possible values are: +
|
+
meta + |
+Optional (additional parameter) + |
+The metadata of destination objects that can be specified when moving objects. The format is key1:value1#key2:value2#key3:value3. + NOTE:
+The preceding value indicates that the destination objects in the bucket contain three groups of customized metadata after objects are moved: key1:value1, key2:value2, and key3:value3. + |
+
ps + |
+Optional (additional parameter) + |
+The size of each part in a multipart move task, in bytes. The value ranges from 100KB to 5GB. The default value is the value of defaultPartSize in the configuration file. + NOTE:
+
|
+
cpd + |
+Optional (additional parameter) + |
+The folder where the part records reside. The default value is .obsutil_checkpoint, the subfolder in the home directory of the user who executes obsutil commands. + NOTE:
+A part record is generated during a multipart move and saved to the copy subfolder. After the move succeeds, its part record is deleted automatically. If the move fails or is suspended, the system attempts to resume the task according to its part record when you perform the move the next time. + |
+
r + |
+Mandatory for moving objects in batches (additional parameter) + |
+Moves objects in batches based on a specified name prefix of objects in the source bucket. + |
+
f + |
+Optional for moving objects in batches (additional parameter) + |
+Runs in force mode. + |
+
j + |
+Optional for moving objects in batches (additional parameter) + |
+The maximum number of concurrent tasks for moving objects in batches. The default value is the value of defaultJobs in the configuration file. + NOTE:
+The value is ensured to be greater than or equal to 1. + |
+
exclude + |
+Optional for moving objects in batches (additional parameter) + |
+The matching patterns of source objects that are excluded, for example: *.txt + NOTE:
+
NOTICE:
+
|
+
include + |
+Optional for moving objects in batches (additional parameter) + |
+The matching patterns of source objects that are included, for example: *.jpg + NOTE:
+
NOTICE:
+
|
+
timeRange + |
+Optional for moving objects in batches (additional parameter) + |
+The time range matching pattern when moving objects. Only objects whose latest modification time is within the configured time range are moved. +This pattern has a lower priority than the object matching patterns (exclude/include). That is, the time range matching pattern is executed after the configured object matching patterns. + NOTE:
+
NOTICE:
+
|
+
mf + |
+Optional (additional parameter) + |
+Indicates that the name matching pattern (include or exclude) and the time matching pattern (timeRange) also take effect on objects whose names end with a slash (/). + + |
+
o + |
+Optional (additional parameter) + |
+The folder that stores the result files. After the command is executed, result files (possibly success, failure, and warning files) will be created in the specified folder. The default value is .obsutil_output, a subfolder in the user's home directory where obsutil commands are executed. + NOTE:
+
|
+
bucket-cname + |
+Optional (additional parameter) + |
+The user-defined domain name bound to the bucket + NOTE:
+This parameter is only supported by obsutil 5.7.9 and later. + |
+
config + |
+Optional (additional parameter) + |
+The user-defined configuration file for executing the current command. For details about parameters that can be configured, see Configuration Parameters. + |
+
payer + |
+Optional (additional parameter) + |
+Specifies that requester pays is enabled. + |
+
Refer to Response for uploading an object.
+obsutil provides multiple methods for users to locate and analyze faults. Table 1 details the methods. Generally, you need to combine these methods for a precise fault locating.
+ +Method + |
+Description + |
+
|---|---|
| + | +obsutil log files include tool logs and SDK logs. The tool logs record the success information and exceptions generated during obsutil running. The SDK logs record the success information and exceptions generated during requesting for OBS. + |
+
| + | +Result lists are generated after batch tasks complete and may include success, failure, and warning files. + |
+
| + | +obsutil yields different return codes based on different execution results. You can analyze and troubleshoot faults according to these return codes. + |
+
obsutil log files include tool logs and SDK logs. You can add the following parameters to the .obsutilconfig file to enable the two logging functions.
+
If multiple obsutil processes are running at the same time, log files may fail to be written concurrently or may be lost. In this case, add parameter -config when running commands to configure an independent configuration file for each process. Make sure that utilLogPath and sdkLogPath are set to different paths for each process.
+You can collect logs in either of the following methods:
+Method 1: Use auxiliary commands by referring to Archiving Log Files.
+Method 2: Locate the paths specified by utilLogPath and sdkLogPath in the configuration file, and then search for the log files in the corresponding paths in the local file system.
+Result files are generated when batch tasks complete. By default, they are saved to the subfolder .obsutil_output in the home directory of the user who executes obsutil commands. You can specify another folder to save them by setting the additional parameter -o when executing a command.
+Result files are classified into success, failure, and warning files. The naming rule is as follows: Operation _{succeed | failed | warning}_report_ Time _TaskId.txt. For example, the name of the result file for successfully uploading a folder is cp_succeed_report_20190417021908_fbbc83e3-98ac-4d19-b23a-64023b1e0c34.txt, among which, fbbc83e3-98ac-4d19-b23a-64023b1e0c34 indicates the task ID.
+
If obsutil is invoked by processes, the command output cannot be viewed in real time. obsutil generates different return codes based on different execution results. Table 1 describes the return codes. You can use either the following methods to obtain the return code of the latest execution result and then analyze and rectify the fault based on it:
+echo $?+
echo %errorlevel%+
Return Code + |
+Meaning + |
+Example Scenario + |
+
|---|---|---|
0 + |
+Execution succeeded. + |
+An object is successfully uploaded. + |
+
1 + |
+The file does not exist. + |
+The entered file path does not exist for uploading a file by running the cp command. + |
+
2 + |
+The task does not exist. + |
+The specified task ID does not exist for resuming a failed upload task by running the cp command. + |
+
3 + |
+Parameter error + |
+
|
+
4 + |
+Bucket status error + |
+The specified destination bucket does not exist for uploading a folder by running the cp command. + |
+
5 + |
+Initialization error during command execution + |
+
|
+
6 + |
+Execution error. + |
+When you run the ls command to query the bucket list, the query fails because the network times out. + |
+
7 + |
+The operation is not supported. + |
+Running the chattri command to change object properties. + |
+
8 + |
+A batch task succeeded partially. + |
+Some objects fail to be downloaded during a batch download by running the cp command. + |
+
9 + |
+Interruption error + |
+Users press Ctrl + C to interrupt the command execution. + |
+
-1 + |
+Unknown error + |
+- + |
+
obsutil supports resumable data transfer (upload, download, and copy) for large files by using the multipart algorithms for upload, download, and copy. You can set the threshold size for starting a multipart upload, download, or copy task based on your actual requirements to resume the upload, download, or copy task if the task fails or is interrupted. You can specify the threshold size for starting a multipart task in either of the following ways:
+Set defaultBigfileThreshold in the configuration file. For details, see Configuration Parameters.
+Set threshold, a command-level parameter, when you run commands for object uploads, object downloads, object copy, synchronous uploads of incremental objects, synchronous downloads of incremental objects, and synchronous copy of incremental objects.
+Example: obsutil cp d:\temp\test.txt obs://bucket-test/key -threshold=52428800
+In this command:
+obsutil cp d:\temp\test.txt obs://bucket-test/key -threshold=52428800 + +Parallel: 3 Jobs: 3 +Threshold: 50.00MB PartSize: auto +VerifyLength: false VerifyMd5: false +CheckpointDir: xxxx + +[====================================================] 100.00% 1.68 MB/s 5s +Upload successfully, 8.46MB, d:\temp\test.txt --> obs://bucket-test/key+
obsutil supports the upload of the real path to which the symbolic link points when a file or folder is uploaded. You can specify the command-level parameter link to implement this function when running commands for upload or incremental synchronization upload.
+
When you call APIs, you need to use the AK and SK for authentication. To obtain the AK and SK, perform the following steps:
+
This step is required only when you have enabled operation protection.
+
Keep AKs and SKs properly to prevent information leakage.
+You can use this command to specify the bucket name, object name prefix, and access code to create an authorization code for directory sharing.
+obsutil create-share obs://bucket[/prefix] [-ac=xxx] [-vp=xxx] [-dst=xxx] [-config=xxx]+
./obsutil create-share obs://bucket[/prefix] [-ac=xxx] [-vp=xxx] [-dst=xxx] [-config=xxx]+
obsutil create-share obs://bucket/test/ -ac=123456 -vp=1m + +Authorization Code: +token=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx + +Access Code: +123456 + +Valid Until: +Sat, 26 Oct 2019 11:28:10 GMT +0800+
Parameter + |
+Optional or Mandatory + |
+Description + |
+
|---|---|---|
bucket + |
+Mandatory + |
+The bucket name + |
+
prefix + |
+Optional + |
+The prefix of an object name. If this parameter is specified, objects starting with this prefix are shared. If this parameter is left blank, all objects in the bucket are shared. + NOTE:
+It is recommended that the value end with a slash (/). + |
+
ac + |
+Optional (additional parameter) + |
+The access code + NOTE:
+
|
+
vp + |
+Optional (additional parameter) + |
+The validity period of an authorization code. The default value is one day, indicating that the generated authorization code is valid for only one day. + NOTE:
+
|
+
dst + |
+Optional (additional parameter) + |
+The path for storing the generated authorization code + |
+
config + |
+Optional (additional parameter) + |
+The user-defined configuration file for executing the current command. For details about parameters that can be configured, see Configuration Parameters. + |
+
payer + |
+Optional (additional parameter) + |
+Specifies that requester pays is enabled. + |
+
Field + |
+Description + |
+
|---|---|
Authorization Code + |
+The code for authorization + |
+
Access Code + |
+The access code + |
+
Valid Until + |
+The expiration time + |
+
You can use this command to query objects in a bucket with an authorization code. The returned objects are sorted in lexicographical order.
+obsutil share-ls authorization_code [-ac=xxx] [-prefix=xxx] [-s] [-d] [-marker=xxx] [-bf=xxx] [-limit=1] [-config=xxx]+
obsutil share-ls file://authorization_code_file_url [-ac=xxx] [-prefix=xxx] [-s] [-d] [-marker=xxx] [-bf=xxx] [-limit=1] [-config=xxx]+
./obsutil share-ls authorization_code [-ac=xxx] [-prefix=xxx] [-s] [-d] [-marker=xxx] [-bf=xxx] [-limit=1] [-config=xxx]+
./obsutil share-ls file://authorization_code_file_url [-ac=xxx] [-prefix=xxx] [-s] [-d] [-marker=xxx] [-bf=xxx] [-limit=1] [-config=xxx]+
obsutil share-ls xxx -ac=123456 -limit=1 +The authorized prefix is [test/test.tar.gz] +Listing objects . +Object list: +key LastModified Size StorageClass ETag +obs://bucket-test/test/test.tar.gz 2019-07-11T14:50:59Z 48.92KB standard "1dd27294ad2f152b43cd111e9fe3990f" + +Total size of prefix [test/]: 48.92KB +Folder number: 0 +File number: 1 +The authorized prefix is [test/]+
obsutil share-ls xxx -ac=123456 -limit=1 + +The authorized prefix is [test] + +Listing objects . + +Folder list: +obs://bucket-test/test/ + +Object list: +key LastModified Size StorageClass ETag +obs://bucket-test/test/test.tar.gz 2019-07-11T14:50:59Z 48.92KB standard "1dd27294ad2f152b43cd111e9fe3990f" + +Total size of prefix [test/]: 48.92KB +Folder number: 1 +File number: 1 +The authorized prefix is [test/]+
Parameter + |
+Optional or Mandatory + |
+Description + |
+
|---|---|---|
authorization_code +or +file://authorization_code_file_url + |
+Mandatory + |
+The code for authorization + NOTE:
+If the authorization code starts with file://, the authorization code is obtained from a local file. + |
+
ac + |
+Optional (additional parameter) + |
+The access code + NOTE:
+
|
+
prefix + |
+Optional (additional parameter) + |
+The object name prefix specified for listing objects using an authorization code + NOTE:
+
|
+
s + |
+Optional (additional parameter) + |
+Displays simplified query result. + NOTE:
+In the simplified format, the returned result contains only the object name. + |
+
d + |
+Optional (additional parameter) + |
+Lists only objects and subdirectories in the current directory, instead of recursively listing all objects and subdirectories. + NOTE:
+According to the naming conventions in OBS, a slash (/) is used as the directory separator. + |
+
marker + |
+Optional (additional parameter) + |
+The start position for listing objects in a bucket using an authorization code. The objects following this start position are sorted in lexicographical order by object name. + |
+
bf + |
+Optional (additional parameter) + |
+The display formats of bytes in the listing result. Possible values are: +
NOTE:
+If this parameter is not configured, the display format of bytes in the result is determined by the humanReadableFormat parameter in the configuration file. + |
+
limit + |
+Optional (additional parameter) + |
+The maximum number of objects that can be listed. If the value is less than or equal to 0, all objects are listed. If it is left blank, 1000 objects are listed by default. + NOTE:
+If there are a large number of objects in a bucket, you are advised to set this parameter to limit the number of objects to be listed each time. If not all objects are listed, marker of the next request will be returned in the result, which you can use to list the remaining objects. + |
+
config + |
+Optional (additional parameter) + |
+The user-defined configuration file for executing the current command. For details about parameters that can be configured, see Configuration Parameters. + |
+
You can use this command to download an object or download objects in a batch by object name prefix to your local PC.
+
Do not change the source objects in the OBS bucket when downloading a single object or objects in batches. Otherwise, the download may fail or data may be inconsistent.
+obsutil share-cp authorization_code file_or_folder_url -key=xxx [-ac=xxx] [-dryRun] [-tempFileDir=xxx] [-u] [-vlength] [-vmd5] [-p=1] [-threshold=52428800] [-ps=auto] [-cpd=xxx][-fr] [-o=xxx] [-config=xxx]+
obsutil share-cp file://authorization_code_file_url file_or_folder_url -key=xxx [-ac=xxx] [-dryRun] [-tempFileDir=xxx] [-u] [-vlength] [-vmd5] [-p=1] [-threshold=52428800] [-ps=auto] [-cpd=xxx][-fr] [-o=xxx] [-config=xxx]+
obsutil share-cp authorization_code folder_url -r [-key=xxx] [-ac=xxx] [-dryRun] [-tempFileDir=xxx] [-f] [-u] [-vlength] [-vmd5] [-flat] [-j=1] [-p=1] [-threshold=52428800] [-ps=auto] [-include=*.xxx] [-exclude=*.xxx] [-timeRange=time1-time2] [-mf] [-o=xxx] [-cpd=xxx] [-config=xxx]+
obsutil share-cp file://authorization_code_file_url folder_url -r [-key=xxx] [-ac=xxx] [-dryRun] [-tempFileDir=xxx] [-f] [-u] [-vlength] [-vmd5] [-flat] [-j=1] [-p=1] [-threshold=52428800] [-ps=auto] [-include=*.xxx] [-exclude=*.xxx] [-timeRange=time1-time2] [-mf] [-o=xxx] [-cpd=xxx] [-config=xxx]+
./obsutil share-cp authorization_code file_or_folder_url -key=xxx [-ac=xxx] [-dryRun] [-tempFileDir=xxx] [-u] [-vlength] [-vmd5] [-p=1] [-threshold=52428800] [-ps=auto] [-cpd=xxx][-fr] [-o=xxx] [-config=xxx]+
./obsutil share-cp file://authorization_code_file_url file_or_folder_url -key=xxx [-ac=xxx] [-dryRun] [-tempFileDir=xxx] [-u] [-vlength] [-vmd5] [-p=1] [-threshold=52428800] [-ps=auto] [-cpd=xxx][-fr] [-o=xxx] [-config=xxx]+
./obsutil share-cp authorization_code folder_url -r [-key=xxx] [-ac=xxx] [-dryRun] [-tempFileDir=xxx] [-f] [-u] [-vlength] [-vmd5] [-flat] [-j=1] [-p=1] [-threshold=52428800] [-ps=auto] [-include=*.xxx] [-exclude=*.xxx] [-timeRange=time1-time2] [-mf] [-o=xxx] [-cpd=xxx] [-config=xxx]+
./obsutil share-cp file://authorization_code_file_url folder_url -r [-key=xxx] [-ac=xxx] [-dryRun] [-tempFileDir=xxx] [-f] [-u] [-vlength] [-vmd5] [-flat] [-j=1] [-p=1] [-threshold=52428800] [-ps=auto] [-include=*.xxx] [-exclude=*.xxx] [-timeRange=time1-time2] [-mf] [-o=xxx] [-cpd=xxx] [-config=xxx]+
obsutil share-cp xxx d:\temp\test.txt -ac=123456 -key=test/test.txt +The authorized prefix is [test/test.txt] + +Start at 2024-09-30 07:55:36.7698045 +0000 UTC + +Parallel: 3 Jobs: 3 +Threshold: 50.00MB PartSize: auto +VerifyLength: false VerifyMd5: false +CheckpointDir: xxxx +TempFileDir: xxxx +Waiting to prepare the temp file [xxx]. +[==========================================] 100.00% 4.86 KB/s 0s +Download successfully, 19B, n/a, https://endpoint:443/test/test.txt --> d:\temp\test.txt +The authorized prefix is [test/test.txt]+
obsutil share-cp xxx d:\temp -ac=123456 -f -r +The authorized prefix is [test] + +Start at 2024-09-30 08:05:07.0097508 +0000 UTC + +Parallel: 3 Jobs: 3 +Threshold: 50.00MB PartSize: auto +VerifyLength: false VerifyMd5: false +CheckpointDir: xxxx + +Task id: 1a50b1dd-3f92-42ae-a974-ff8fe514c2c2 +OutputDir: xxxx +TempFileDir: xxxx + +[======================================================] 100.00% 155.59 KB/s 0s +Succeed count: 6 Failed count: 0 +Succeed bytes: xxx +Metrics [max cost:153 ms, min cost:129 ms, average cost:92.00 ms, average tps:17.86, transferred size:70B] + +Task id: 1a50b1dd-3f92-42ae-a974-ff8fe514c2c2 +The authorized prefix is [test/]+
Parameter + |
+Optional or Mandatory + |
+Description + |
+
|---|---|---|
authorization_code +or +file://authorization_code_file_url + |
+Mandatory + |
+The code for authorization + NOTE:
+If the authorization code starts with file://, the authorization code is obtained from a local file. + |
+
file_or_folder_url + |
+Mandatory for downloading an object + |
+The local file/folder path + |
+
folder_url + |
+Mandatory for downloading objects in a batch + |
+The local folder path + |
+
key + |
+Mandatory for downloading an object (additional parameter) +Optional for downloading objects in a batch + |
+The name of the object to be downloaded, or the name prefix of the objects to be downloaded in batches +This parameter cannot be left blank when downloading an object. The saving and naming rules are as follows: +
During batch download, the saving rules are as follows: +
NOTE:
+
NOTICE:
+During batch download, if the flat option is selected and the object name prefix is empty or does not end with a slash (/) during authorization code creation, the downloaded object list may be empty. + |
+
ac + |
+Optional (additional parameter) + |
+The access code + NOTE:
+
|
+
r + |
+Mandatory for downloading objects in batches (additional parameter) + |
+Copies objects in batches based on a specified object name prefix. + |
+
fr + |
+Optional for downloading an object (additional parameter) + |
+Generates an operation result file when downloading an object. + |
+
flat + |
+Optional for downloading objects in batches (additional parameter) + |
+The name prefix of the parent object is excluded when downloading objects in a batch. + |
+
tempFileDir + |
+Optional (additional parameter) + |
+The directory for storing temporary files during multipart download. The default value is the value of defaultTempFileDir in the configuration file. + NOTE:
+
|
+
dryRun + |
+Optional (additional parameter) + |
+Conducts a dry run. + |
+
u + |
+Optional (additional parameter) + |
+Indicates incremental download. If this parameter is set, each object can be downloaded only when it does not exist in the local path, its size is different from the namesake one in the local path, or it has the latest modification time. + |
+
vlength + |
+Optional (additional parameter) + |
+Checks whether the sizes of the local files are the same as those of the objects in the bucket after the download is complete. + |
+
vmd5 + |
+Optional (additional parameter) + |
+Checks whether MD5 values of the local files are the same as those of the objects in the bucket after the download is complete. + NOTE:
+Objects in the bucket must contain metadata x-obs-meta-md5chksum, or MD5 verification will be skipped. + CAUTION:
+If your object needs encryption, do not use this parameter. + |
+
p + |
+Optional (additional parameter) + |
+The maximum number of concurrent multipart download tasks when downloading an object. The default value is the value of defaultParallels in the configuration file. + |
+
threshold + |
+Optional (additional parameter) + |
+The threshold for enabling multipart download, in bytes. The default value is the value of defaultBigfileThreshold in the configuration file. + NOTE:
+
|
+
ps + |
+Optional (additional parameter) + |
+The size of each part in a multipart download task, in bytes. The default value is the value of defaultPartSize in the configuration file. + NOTE:
+
|
+
cpd + |
+Optional (additional parameter) + |
+The folder where the part records reside. The default value is .obsutil_checkpoint, the subfolder in the home directory of the user who executes obsutil commands. + NOTE:
+A part record is generated during a multipart download and saved to the down subfolder. After the download succeeds, its part record is deleted automatically. If the download fails or is suspended, the system attempts to resume the task according to its part record when you perform the download the next time. + |
+
f + |
+Optional for downloading objects in a batch (additional parameter) + |
+Runs in force mode. + |
+
j + |
+Optional for downloading objects in a batch (additional parameter) + |
+The maximum number of concurrent tasks for downloading objects in a batch. The default value is the value of defaultJobs in the configuration file. + NOTE:
+The value is ensured to be greater than or equal to 1. + |
+
exclude + |
+Optional for downloading objects in a batch (additional parameter) + |
+The matching patterns of source objects that are excluded, for example: *.txt + NOTE:
+
NOTICE:
+
|
+
include + |
+Optional for downloading objects in a batch (additional parameter) + |
+The matching patterns of source objects that are included, for example: *.jpg + NOTE:
+
NOTICE:
+
|
+
timeRange + |
+Optional for downloading objects in a batch (additional parameter) + |
+The time range matching pattern when downloading objects. Only objects whose latest modification time is within the configured time range are downloaded. +This pattern has a lower priority than the object matching patterns (exclude/include). That is, the time range matching pattern is executed after the configured object matching patterns. + NOTE:
+
NOTICE:
+
|
+
mf + |
+Optional (additional parameter) + |
+Indicates that the name matching pattern (include or exclude) and the time matching pattern (timeRange) also take effect on objects whose names end with a slash (/). + + |
+
o + |
+Optional (additional parameter) + |
+The folder that stores the result files. After the command is executed, result files (possibly success, failure, and warning files) will be created in the specified folder. The default value is .obsutil_output, a subfolder in the user's home directory where obsutil commands are executed. + NOTE:
+
|
+
config + |
+Optional (additional parameter) + |
+The user-defined configuration file for executing the current command. For details about parameters that can be configured, see Configuration Parameters. + |
+
Refer to Response for uploading an object.
+All commands in this section use the Linux operating system as an example to describe how to delete all multipart upload tasks in a bucket.
+Assume that bucket bucket-test contains the following multipart upload tasks:
+obs://bucket-test/task1.txt uploadid1 +obs://bucket-test/task1.txt uploadid2 +obs://bucket-test/task2.txt uploadid3 +obs://bucket-test/task3.txt uploadid4 +obs://bucket-test/src1/ +obs://bucket-test/src1/task4.txt uploadid5 +obs://bucket-test/src2/ +obs://bucket-test/src2/task5.txt uploadid6+
You can run the following command to delete all fragments of multipart upload tasks in the bucket at a time:
+./obsutil abort obs://bucket-test -r -f+
obsutil provides help commands for viewing the help documents of each command. To query the help document of the bucket creation command, perform the following steps:
+Summary: +create a bucket with the specified parameters + +Syntax: + obsutil mb obs://bucket [-fs] [-acl=xxx] [-sc=xxx] [-location=xxx] [-config=xxx] + +Options: + -fs + create a bucket that supports POSIX + + -acl=xxx + the ACL of the bucket, possible values are [private|public-read|public-read-write] + + -sc=xxx + the default storage class of the bucket, possible values are: [standard|warm|cold] + + -location=xxx + the region where the bucket is located + + -config=xxx + the path to the custom config file when running this command+
You can configure an HTTP proxy in either of the following ways:
+Method 1: Set the proxyUrl parameter in the .obsutilconfig file, for example, proxyUrl=http://username:password@your-proxy:8080.
+Method 2: Use the system environment variable HTTPS_PROXY or HTTP_PROXY, for example, HTTPS_PROXY=http://username:password@your-proxy:8080.
+
The directory sharing function allows the owner of a bucket to share directories in a bucket or the entire bucket with other users by using the authorization code and access code. If you have the valid authorization code and access code of a shared folder, you can use OBS tools (OBS Browser and obsutil) to access the folder, list objects, and download objects. Alternatively, you can directly enter the authorization code in the address box of a web browser to list and download objects.
+obsutil provides three commands to implement directory sharing. The procedure is as follows:
+obsutil create-share obs://bucket/test/ -ac=123456 -vp=10d+
obsutil share-ls file://d:/authorizationCode.txt -ac=123456 -prefix=test/ -limit=100+
obsutil share-cp file://d:/authorizationCode.txt ./ -ac=123456 -key=test/sub/ -r -f+ +
obsutil allows you to configure the rateLimitThreshold parameter in the .obsutilconfig file to limit the upload and download rate.
+For detailed parameter description, see Configuration Parameters. If you do not configure this parameter, the upload and download rate will not be limited, but depend on the user's network bandwidth and the number of concurrent tasks. For details about the optimization, see Fine-Tuning obsutil Performance.
+Parameter rateLimitThreshold limits the global rate of obsutil tasks. This means that if you upload and download files in batches using the cp and sync commands, the actual upper rate is the one specified by rateLimitThreshold, not by the value obtained as follows: Number of concurrent tasks x Value of rateLimitThreshold.
+No.
+obsutil allows you to upload your local directory to an OBS bucket. After the synchronization, if you delete some files in the local directory and then perform an incremental upload, obsutil only checks whether there are incremental files that need to be uploaded. obsutil cannot detect the deleted files, so these files will not be deleted in the bucket.
+If new files are added to your local directory during an upload, the number of objects uploaded by obsutil may be inconsistent with that in the local directory. To keep the files same in both places, run the incremental upload command after the upload is complete.
+obsutil does not allow you to directly save a listing result to a local file, but you can redirect a listing result displayed on the screen in standard output to a specified local file by relying on the redirection supported by OS. The following uses the listing of objects in a bucket as an example:
+obsutil ls obs://bucketName -limit=0 > D:/result.txt+
./obsutil ls obs://bucketName -limit=0 > /root/result.txt+
In Windows, you need to perform the redirection operation in the CLI to redirect the output to a local file. Do not run the redirection command in the obsutil executable file because obsutil does not support redirection.
+When you use obsutil to list all objects in a bucket, the listing result contains the total size of the objects. If the total size is different from that on OBS Console or OBS Browser+, go through the following list to locate the fault:
+After a batch task is completed, there will be results telling you how many tasks succeeded or failed. To find out why those tasks failed, you can check their failure result file or obsutil log file.
+After a batch task is executed, its task ID will be generated. You can query the failure result file in the .obsutil_output directory based on the task ID. The file is named in the cp_{failed}_report_Time_TaskId.txt format and contains detailed error information about each failed task.
+In addition, you can view the obsutil log file to query the error records during obsutil running. You are advised to set the log level to DEBUG for fault locating. For details about the log configuration and log path, see Log Files.
+I/O timeout and EOF errors usually occur when requests fail due to network fluctuations. Go through the following list to locate the cause.
+Solutions:
+Possible causes:
+When a batch upload or download task is being executed, if there are a large number of objects involved, obsutil needs to traverse all objects to collect the total number and size of objects in the task. During this collection process, a question mark (?) is displayed in the progress bar.
+Solution:
+After the information is collected, corresponding task details will be displayed in the progress bar.
+No.
+obsutil allows you to configure multiple config files, but they cannot be stored in the same directory due to encryption requirements.
+If multiple config files are required, initialize them to put them in different directories.
+Yes. You can run the mv command to rename an object or a folder. The following give two examples in Windows.
+obsutil mv obs://bucket-test/key obs://bucket-test/key2 + +Parallel: 5 Jobs: 5 +Threshold: 50.00MB PartSize: auto +CheckpointDir: xxxx + +Move successfully, 19B, obs://bucket-test/key --> obs://bucket-test/key2, cost [96], status [200], request id [xxxxxxxxx]+
obsutil mv obs://bucket-test/temp/ obs://bucket-test/temp2/ -flat -f -r + +Parallel: 5 Jobs: 5 +Threshold: 50.00MB PartSize: auto +CheckpointDir: xxxx +OutputDir: xxxx + + +[=============================================================] 100.00% tps:0.00 2/2 174ms +Succeed count: 5 Failed count: 0 +Metrics [max cost:298 ms, min cost:192 ms, average cost:238.00 ms, average tps:9.71, transferred size:70B] + +Task id: 0476929d-9d23-4dc5-b2f8-0a0493f027c5+
When renaming a folder, you must add the -flat parameter.
+