Large object downloads can fail when the network is unstable or other exceptions occur — and retrying may not recover the lost progress. Use OSS SDKs or ossutil to download large objects with resumable download support.
Use OSS SDKs
OSS SDKs support resumable download, which records progress in a checkpoint file and resumes from where the last attempt stopped if a part fails.
How it works:
Download progress is recorded in a checkpoint file.
If a part fails, the next attempt resumes from the position recorded in the checkpoint file.
The checkpoint file is deleted automatically after the download completes.
Prerequisites
Before you begin, make sure that you have:
The
oss:GetObjectpermission. For details, see Attach a custom policy to a RAM user.Write permissions on the checkpoint file.
The examples in the SDK documentation use the public endpoint of the China (Hangzhou) region. If you access OSS from another Alibaba Cloud service in the same region, use the internal endpoint instead. For a full list of regions and endpoints, see Regions and endpoints.
To create an OSSClient instance using a custom domain or Security Token Service (STS), see Initialization.
Do not modify the checksum in the checkpoint file. If the file is corrupted, all parts are downloaded again from the start. If the object's ETag changes or parts are lost or modified during download, the entire object is downloaded again.
For code examples, see Resumable download.
Use ossutil
Run the cp command in ossutil to download a large object.
For details, see Download objects.