Portal Community

What Is Covered by SQL Server Backup

DataTable(s)Criticality
Agent configurationsOctopus_AgentsCritical — losing this loses all agents
Conversation historyOctopus_Episodes, Octopus_EpisodeMessagesHigh — long-term user context
Procedural memoryOctopus_ProceduresHigh — defines agent skill sequences
AI FunctionsOctopus_AIFunctionsHigh — runtime-editable tool logic
AreasOctopus_AreasCritical — controls agent routing and access
Vector store not included. Semantic memory (document embeddings) is stored in Qdrant or PGVector — not in SQL Server. Back up the vector store separately. See the SemanticKernelPlugin guide for vector backup procedures.

Recommended Backup Schedule

-- Full database backup: daily at midnight
BACKUP DATABASE [OctopusAI]
TO DISK = N'\\backup-server\octopus\full\OctopusAI_full.bak'
WITH
    COMPRESSION,
    CHECKSUM,
    STATS = 10;

-- Differential backup: every 6 hours
BACKUP DATABASE [OctopusAI]
TO DISK = N'\\backup-server\octopus\diff\OctopusAI_diff.bak'
WITH
    DIFFERENTIAL,
    COMPRESSION,
    CHECKSUM;

-- Transaction log backup: every 15 minutes (for point-in-time recovery)
BACKUP LOG [OctopusAI]
TO DISK = N'\\backup-server\octopus\log\OctopusAI_log.bak'
WITH COMPRESSION, CHECKSUM;

Azure SQL Backup (Managed Service)

If using Azure SQL Database, automated backups are configured via the Azure portal:

# Azure CLI — configure backup retention
az sql db ltr-policy set \
    --resource-group myRG \
    --server myserver \
    --database OctopusAI \
    --weekly-retention P4W \
    --monthly-retention P12M \
    --yearly-retention P5Y \
    --week-of-year 1

Recovery Procedure

1
Stop the Octopus application instances Prevent new writes while the restore is in progress.
2
Restore the full backup RESTORE DATABASE [OctopusAI] FROM DISK = '...\OctopusAI_full.bak' WITH NORECOVERY
3
Apply differential backups (if any) RESTORE DATABASE [OctopusAI] FROM DISK = '...\OctopusAI_diff.bak' WITH NORECOVERY
4
Apply transaction log backups to target point-in-time RESTORE LOG [OctopusAI] FROM DISK = '...' WITH RECOVERY, STOPAT = '2024-06-15 14:30:00'
5
Verify schema is consistent Run dotnet ef migrations list to confirm schema matches the application version.
6
Restart Octopus application instances Application will verify connectivity on startup and resume serving requests.

Recovery Time Objectives

ScenarioRPO (data loss)RTO (downtime)
Full restore from daily backupUp to 24 hours15–60 min depending on DB size
Full + differential restoreUp to 6 hours15–30 min
Full + differential + log restoreUp to 15 min20–45 min
Azure SQL point-in-time restoreUp to 5–8 min5–15 min