Overview
Archival moves data from the active persistence store to cheaper, long-term storage:- History Archival - Complete workflow execution history
- Visibility Archival - Workflow metadata for search and list
Supported Providers
Temporal includes built-in archival providers:- Filestore - Local or network filesystem
- S3 - Amazon S3 and compatible services
- Google Cloud Storage - GCS buckets
Global Configuration
Enable archival cluster-wide:enabled- Archival active, namespaces can enabledisabled- Archival unavailablepaused- Temporarily suspended
enableRead- Allow reading from archive
Filestore Provider
Configuration
URI Format
Best Practices
- Network Storage: Use NFS or similar for multi-node access
- Permissions: Ensure all Temporal workers can read/write
- Quotas: Monitor disk usage, implement rotation
- Backup: Regular backups of archive directory
Example Setup
S3 Provider
Configuration
URI Format
Authentication
Use IAM roles (recommended) or credentials:- IAM Role (AWS)
- Credentials
- MinIO
S3 Bucket Configuration
lifecycle.json):
Google Cloud Storage Provider
Configuration
URI Format
Authentication
- Service Account
- Workload Identity (GKE)
GCS Bucket Configuration
lifecycle.json):
Namespace Configuration
Configure archival per namespace:enabled- Archive workflows in this namespacedisabled- Do not archive
Default Namespace Archival
Set defaults for new namespaces:Reading Archived Data
History
Retrieve archived workflow history:Visibility
Query archived workflows:Archival Process
Archival occurs through system workflows:- Workflow Completes - Workflow reaches final state
- Retention Period - Waits for namespace retention period
- Archival Task - System worker picks up archival task
- Upload History - History events uploaded to archive URI
- Upload Visibility - Visibility record uploaded
- Delete from DB - Primary store data deleted
Archival Workers
System workers handle archival:Monitoring Archival
Metrics
- Request count
- Error count
- Upload size
- Latency
Alerts
Recommended alerts:-
Archival Failures
-
High Archival Latency
-
Queue Backlog
Archival Best Practices
1. Separate Archive URIs per Namespace
2. Configure Retention Appropriately
3. Test Archive Reads Regularly
4. Monitor Storage Costs
- Use lifecycle policies to transition to cheaper storage
- Archive only necessary namespaces
- Set appropriate retention periods
5. Implement Archive Backup
Backup archive storage separately:Troubleshooting
Archival Failures
Symptoms:HistoryArchiver_errorsmetrics increasing- Workflows not archived after retention
- Permissions - Missing S3/GCS write permissions
- URI Invalid - Incorrect bucket name or path
- Network - Cannot reach storage endpoint
- Quota - Storage quota exceeded
Cannot Read Archived Data
Symptoms:workflow not foundwhen querying old workflows- Archive reads fail
- Verify
enableRead: truein global config - Check archive URI matches namespace config
- Verify read permissions on storage
- Check worker can access storage endpoint
High Archival Latency
Symptoms:- Slow archival task processing
- Large queue backlog
- Scale worker service horizontally
- Increase worker task processing concurrency
- Use faster storage tier
- Optimize network path to storage
Advanced Configuration
Custom Archiver Implementation
Implement custom archiver for proprietary storage:Archival Workflow Customization
Configure archival workflow via dynamic config:See Also
- Persistence - Primary data store configuration
- Monitoring - Archival metrics
- DLQ Management - Handling failed archival tasks