Skip to main content

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

FeatureFreeProGrowthEnterprise
Automatic Backups-DailyDailyHourly
Backup Retention-7 days30 days90 days
Manual Export1/monthUnlimitedUnlimitedUnlimited
Project Versioning5 versions20 versions50 versionsUnlimited
BYOS Backup---Yes

Manual Data Export

Via Dashboard

  1. Go to SettingsAccountData Management
  2. Click Export Data
  3. Select what to include:
    • Projects
    • Agents
    • Chat History
    • Settings
  4. Choose format: JSON, CSV, or ZIP
  5. Click Start Export
  6. 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

  1. Open your project
  2. Click SettingsBackup
  3. Click Create Backup
  4. 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

  1. Go to SettingsAccountData Management
  2. Click Restore Data
  3. Upload your backup file
  4. Select restore options:
    • Replace: Overwrites existing data
    • Merge: Adds to existing data
  5. 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

  1. Enable automatic backups (Pro+ plans)
  2. Schedule weekly exports to your own storage
  3. Test restores periodically

Before Major Changes

Before deleting projects or making significant changes:

  1. Create a manual backup
  2. Verify the backup downloaded successfully
  3. 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