This topic describes the possible problems you may encounter when you use ossutil and their solutions.

The skip message appears when the -u parameter is used to upload an object

Analysis: When you use the -u parameter to upload an object, ossutil compares the object to upload with the existing objects in the bucket. When the name of the object to upload is the same as that of an existing object, if the last modified time of the object to upload is equal to or earlier than the existing object, the object is skipped. If the last modified time of the object to upload is later than the existing object, the object is uploaded. Therefore, the skip message is normal when you use the -u parameter to upload an object.

Solution: Ignore the message if the object is uploaded successfully.

A 403 error is returned when an object is restored.

Analysis: This error is returned because:
  • The RAM user that you use to restore the object does not have corresponding permissions.
  • The object is banned by OSS because its content is illegal.
Solution:
  • Grant permissions to the RAM user.
  • Delete or ignore the object.

An error is returned when a bucket does not contain objects according to the result of the ls command is deleted

Analysis: When you run the ls command without options to list objects in a bucket, the parts and previous versions (for versioned buckets only) in the bucket are not listed. A bucket that contains parts or previous versions cannot be deleted by the rm command.

Solution:
  • Delete parts and previous versions (for versioned buckets only) in a bucket before you delete the bucket.
    1. Delete parts and previous versions in a bucket.
      • Run the following commands to list and delete parts in the bucket:
        ./ossutil ls oss://bucket1 -m
        ./ossutil rm -m oss://bucket1 -r
      • Run the following commands to list and delete previous versions in the bucket:
        ./ossutil ls oss://bucket1 --all-versions
        ./ossutil rm oss://bucket1 --all-versions -r
    2. Delete the bucket.
      ./ossutil rm oss://bucket1 -b
  • Force delete the bucket.
    • Run the following command to force delete an unversioned bucket:
      ./ossutil rm oss://bucketname -abrf
    • Run the following command to force delete a versioned bucket:
      ./ossutil rm oss://bucketname -abrf --all-versions
Warning Deleted buckets and objects cannot be recovered. Exercise caution when you run the preceding commands.

The upload or download progress exceeds 100%

Analysis: A folder named .ossutil_checkpoint is generated when you use ossutil to upload or download objects. By default, if the object to upload or download is larger than 100 MB, resumable upload or download is used. The checkpoint information generated during the upload or download is stored in the .ossutil_checkpoint folder. This folder is deleted after the upload or download is complete. In scenarios where multiple ossutil instances are running on a client at the same time and resumable upload or download is being performed in each instance, when the upload or download in a instance is complete, the folder.ossutil_checkpoint is deleted so that the upload or download in other instances cannot be complete and the progress exceeds 100%.

Solution:
  • Complete the current upload or download tasks and upload or download the object again.
  • Add the --checkpoint-dir parameter in the cp command and specify a folder whose name is different from the default checkpoint folder to store the checkpoint information. Example
    ./ossutil cp oss://bucket1/myphoto.jpg  /dir  --checkpoint-dir checkpoint