Understanding the restore process for data and metadata 

When performing a restore job, you may be restoring both metadata and data. The time required for a restore depends on several factors, including: 

  • Amount of data: The total volume of records, as well as the number of changes (modified or deleted records) since the backup. 
  • API limits: The number of API requests allowed within a specific time period (daily quota). 

How API requests are calculated

For each table or object in your system, the number of API requests required for a restore is calculated based on three components: 

  • Total records: Restored in batches of 2,000. 
  • Modified records: Restored in batches of 200. 
  • Deleted records: Restored in batches of 200. 

The formula to determine the total number of requests for a given table is: 

Note: The ceiling function (⌈x⌉) indicates that if there is any remainder when dividing, an additional request is needed to handle the extra records. 

Example calculation 

Consider a table with the following data: 

  • Total records: 100,000 
  • Modified records: 10,000 
  • Deleted records: 5,000 

Using the formula: 

  • Total records requests: 100,000 / 2000 = 50 requests 
  • Modified records requests: 10,000 / 200 = 50 requests 
  • Deleted records requests: 5,000 / 200 = 25 requests 

Total requests for the table:  50 + 50 + 25 = 125 requests  

If you have 1,000 tables of similar size, the overall number of requests becomes: 

125 requests / table × 1000 tables = 125,000 requests  

Impact of API limits

The actual time it takes to complete the restore job  depends on your daily API request quota. For example, if your daily quota is less than 125,000 requests, the restoration process could span over 24 hours or more. 

Metadata restoration

While the restoration of metadata is also part of the process, its duration is less predictable due to factors like deployment latency. However, in most cases, the metadata restoration does not significantly contribute to the overall running time compared to the data restoration process. 

Summary 

  • Restore process: Involves both metadata and data. 
  • Request calculation: Uses the formula [Total/2000] + [Modified/200] + [Deleted/200] for each table. 
  • Example: A table with 100,000 total records, 10,000 modified, and 5,000 deleted records requires approximately 125 API requests. 
  • Scaling: With 1,000 such tables, the process would need roughly 125,000 API requests. 
  • API limits: Daily API quotas may extend the restore time if the required number of requests exceeds the allowed limit. 
  • Metadata restoration: Generally contributes less to overall time due to variability in deployment latency.