Backup & restore
This guide covers how to back up your Ptolemy workspace data using the Export API and restore it using the Import API. Regular backups are a good operational practice, particularly before large schema changes.
Backup strategy
A complete workspace backup requires exporting each resource type separately. A recommended backup order (respecting foreign key dependencies):
1. Reference data
Instruments and markets first — they have no dependencies on other exportable types.
2. Market listings
Depends on instruments and markets existing.
3. Time series
Depends on instruments and series types.
Type schemas (instrument types, market types, time series types) and their field definitions cannot be exported or imported via the API — they must be recreated manually via the dashboard if you’re migrating to a new workspace.
Running a full backup
Submit export jobs for each resource type and wait for all to complete:
Restoring from backup
To restore, import each resource type in dependency order. Import instruments and markets first, then listings, then time series data.
Restoring into an existing workspace with data may produce
409 Conflict errors for duplicate identifiers. Set on_error: "continue" to skip duplicates and import the rest.Scheduling automated backups
For production workspaces, run backups on a schedule. A simple approach using a cron job:
Store backups externally
Upload exported files to S3, GCS, or your backup service immediately after download. Don’t rely on the pre-signed Ptolemy URL — it expires in 15 minutes.
Test your restore
Periodically restore a backup to a test workspace to verify your backup files are valid and complete.