Backup & Restore
Learn how to backup and restore your tenant data and projects in DgiDgi.
Overview
DgiDgi provides comprehensive backup capabilities to ensure your data is safe:
- Automatic Backups: Platform automatically backs up all data (plan-dependent)
- Manual Exports: Export your data anytime via API or UI
- Project Backups: Individual project backup and versioning
- GDPR Export: Full data export for compliance
Backup Features by Plan
| Feature | Free | Pro | Growth | Enterprise |
|---|---|---|---|---|
| Automatic Backups | - | Daily | Daily | Hourly |
| Backup Retention | - | 7 days | 30 days | 90 days |
| Manual Export | 1/month | Unlimited | Unlimited | Unlimited |
| Project Versioning | 5 versions | 20 versions | 50 versions | Unlimited |
| BYOS Backup | - | - | - | Yes |
Manual Data Export
Via Dashboard
- Go to Settings → Account → Data Management
- Click Export Data
- Select what to include:
- Projects
- Agents
- Chat History
- Settings
- Choose format: JSON, CSV, or ZIP
- Click Start Export
- Download when ready (link valid for 7 days)
Via API
# Request full data export
curl -X POST "https://api.dgidgi.ai/api/v1/tenants/{tenantId}/export" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"format": "zip",
"include": ["all"],
"destination": "download"
}'
# Response
{
"exportId": "exp_123",
"status": "pending"
}
# Check status
curl "https://api.dgidgi.ai/api/v1/tenants/{tenantId}/export/exp_123" \
-H "Authorization: Bearer YOUR_API_KEY"
# Response (when complete)
{
"exportId": "exp_123",
"status": "completed",
"downloadUrl": "https://...",
"expiresAt": "2026-01-20T10:00:00Z",
"size": 15728640
}
Export Contents
Your export includes:
export_{tenantId}_{timestamp}.zip
├── metadata.json # Export info
├── tenant.json # Account settings
├── projects/
│ ├── index.json # Project list
│ └── {projectId}/
│ ├── project.json # Project details
│ ├── files/ # Project files
│ └── agents.json # Project agents
├── agents/
│ └── {agentId}.json # Agent configurations
├── chat/
│ ├── sessions.json # Chat sessions
│ └── messages/ # Message history
└── settings/
└── preferences.json # User preferences
Project Backup
Via Dashboard
- Open your project
- Click Settings → Backup
- Click Create Backup
- Download the backup file
Via API
# Create project backup
curl -X POST "https://api.dgidgi.ai/api/v1/projects/{projectId}/backup" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{
"includeHistory": true,
"includeAgents": true
}'
# Response
{
"downloadUrl": "https://...",
"expiresAt": "2026-01-14T10:00:00Z",
"size": 5242880,
"checksum": "sha256:abc123..."
}
Project Version History
Each project maintains version history:
# List project versions
curl "https://api.dgidgi.ai/api/v1/projects/{projectId}/versions" \
-H "Authorization: Bearer YOUR_API_KEY"
# Restore to specific version
curl -X POST "https://api.dgidgi.ai/api/v1/projects/{projectId}/versions/{versionId}/restore" \
-H "Authorization: Bearer YOUR_API_KEY"
Data Restore
Via Dashboard
- Go to Settings → Account → Data Management
- Click Restore Data
- Upload your backup file
- Select restore options:
- Replace: Overwrites existing data
- Merge: Adds to existing data
- Click Start Restore
Via API
# Restore from backup file
curl -X POST "https://api.dgidgi.ai/api/v1/tenants/{tenantId}/restore" \
-H "Authorization: Bearer YOUR_API_KEY" \
-F "file=@backup.zip" \
-F "options={\"merge\": false, \"validate\": true}"
# Response
{
"restoreId": "rst_123",
"status": "processing"
}
# Check restore status
curl "https://api.dgidgi.ai/api/v1/tenants/{tenantId}/restore/rst_123" \
-H "Authorization: Bearer YOUR_API_KEY"
Scheduled Exports
Set up automatic exports to your own storage:
# Schedule weekly export to S3
curl -X POST "https://api.dgidgi.ai/api/v1/tenants/{tenantId}/export/schedule" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{
"frequency": "weekly",
"format": "zip",
"destination": "s3",
"s3Bucket": "my-backup-bucket",
"s3Prefix": "dgidgi-backups/",
"s3AccessKey": "AKIA...",
"s3SecretKey": "..."
}'
Supported destinations:
- Amazon S3
- Cloudflare R2
- Google Cloud Storage
- Azure Blob Storage
GDPR Data Export
Request a complete export of all your personal data:
# Request GDPR export
curl -X POST "https://api.dgidgi.ai/api/v1/gdpr/export" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{
"format": "json"
}'
This includes:
- All personal data
- Processing history
- Consent records
- Data sharing log
Chat History Export
Export conversation history:
# Export chat history
curl -X POST "https://api.dgidgi.ai/api/v1/chat/export" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{
"dateRange": {
"start": "2025-01-01",
"end": "2026-01-13"
},
"format": "json",
"includeMetadata": true
}'
Best Practices
Regular Backups
- Enable automatic backups (Pro+ plans)
- Schedule weekly exports to your own storage
- Test restores periodically
Before Major Changes
Before deleting projects or making significant changes:
- Create a manual backup
- Verify the backup downloaded successfully
- Proceed with changes
Data Retention
- Keep multiple backup versions
- Store backups in different locations
- Document what each backup contains
Troubleshooting
Export Fails
- Check your storage quota
- Ensure API key has export permissions
- Try exporting smaller data sets
Restore Fails
- Verify backup file isn't corrupted (check checksum)
- Ensure backup version is compatible
- Contact support for large restores
Missing Data After Restore
- Check if you selected "Merge" vs "Replace"
- Verify the backup contains expected data
- Check restore logs for errors