You need to enable JavaScript to run this app.
Torch Object Storage

Torch Object Storage

Copy page
Download PDF
Back-to-origin rules
Back-to-origin overview
Copy page
Download PDF
Back-to-origin overview
You can use the TOS console to set up a back-to-origin rule. This rule instructs TOS to retrieve missing objects directly from the specified origin server whenever they are requested from your bucket.​
Use cases​
TOS offers two back-to-origin options: mirror-based and redirect-based. Both options are ideal for scenarios requiring seamless data migration and allow users to access data that has not yet been migrated to TOS. This ensures business continuity and prevents interruptions to user data access.​
After creating a back-to-origin rule, follow these steps to migrate data from the origin server to TOS:​
  • Use HeadObject to retrieve metadata about the object and verify its existence on the origin server.​
  • Use GetObject to fetch the object and store unmigrated data in TOS.​
Mirror-based and redirect-based back-to-origin both support storing objects in TOS, though there are a few differences:​
  • Mirror-based back-to-origin (Mirroring): Fetches the object from the origin server and returns it to the requester, while simultaneously storing the object in TOS.​
  • Redirect-based back-to-origin (Redirection): When Whether to pull file from the origin server is switched on, TOS fetches the file from the origin server, returns it to the requester, and stores it in the bucket.​
Notes​
​
Category​
Description​
Back-to-origin rules​
  • You can create up to 20 back-to-origin rules. Rules are evaluated in the order they are listed. They stop at the first match. To adjust the rule order, click Up or Down in the Actions column of the rules. For more information, see Other operations.​
  • If no back-to-origin condition is met, no rules are hit.​
Back-to-origin address​
The origin address cannot be set to an internal network address.​
Object metadata​
When saving fetched objects via back-to-origin rules, TOS saves the following headers, which are returned by the origin server, as object metadata.​
​
Content-Language​
Expires​
Content-Disposition​
Content-Encoding​
Cache-Control​
Content-Type​
​
Costs​
Accessing the origin server via mirror-based or redirect-based back-to-origin will generate outbound traffic over the public network. The origin server's cloud service provider will charge fees for this traffic.​
Rule priority​
When both back-to-origin rules and static website redirect rules are configured, the static website redirect rules will take precedence if a 404 error occurs during access to TOS via a custom domain. In such cases, the back-to-origin rules will not be executed.​
​
Related documentation​
​
Last updated: 2026.07.01 14:48:56