siyuan-note/siyuan · error
Backup failed: The cloud can only support backup up to 12 sn
Error message
Backup failed: The cloud can only support backup up to 12 snapshots
What it means
The cloud snapshot upload was rejected because the cloud provider enforces a hard limit of 12 stored backup snapshots. When dejavu's UploadTagIndex detects that uploading a new snapshot would exceed this ceiling, it returns ErrCloudBackupCountExceeded, which the UploadCloudSnapshot function wraps into a user-facing 'Backup failed: The cloud can only support backup up to 12 snapshots' message (Language 84 template + Language 154 text). This is a deliberate quota enforced server-side by the cloud storage backend.
Source
Thrown at kernel/model/repository.go:1482
switch Conf.Sync.Provider {
case conf.ProviderSiYuan:
if !IsSubscriber() {
util.PushErrMsg(Conf.Language(29), 5000)
return
}
case conf.ProviderWebDAV, conf.ProviderS3, conf.ProviderLocal:
if !IsPaidUser() {
util.PushErrMsg(Conf.Language(214), 5000)
return
}
}
util.PushEndlessProgress(Conf.Language(116))
defer util.PushClearProgress()
uploadFileCount, uploadChunkCount, uploadBytes, err := repo.UploadTagIndex(tag, id, map[string]any{eventbus.CtxPushMsg: eventbus.CtxPushMsgToStatusBarAndProgress})
if err != nil {
if errors.Is(err, dejavu.ErrCloudBackupCountExceeded) {
err = fmt.Errorf(Conf.Language(84), Conf.Language(154))
return
}
err = fmt.Errorf(Conf.Language(84), formatRepoErrorMsg(err))
return
}
msg := fmt.Sprintf(Conf.Language(152), uploadFileCount, uploadChunkCount, humanize.BytesCustomCeil(uint64(uploadBytes), 2))
util.PushMsg(msg, 5000)
util.PushStatusBar(msg)
return
}
func RemoveCloudRepoTag(tag string) (err error) {
if 1 > len(Conf.Repo.Key) {
err = errors.New(Conf.Language(26))
return
}
repo, err := newRepository()View on GitHub (pinned to 251596fc0d)
Solutions
- Delete one or more existing cloud snapshots via RemoveCloudRepoTag before uploading a new one, freeing a slot under the 12-snapshot limit
- Use GetCloudRepoTagSnapshots to list current cloud snapshots and remove the oldest or least important ones
- Switch to a sync-based workflow (syncRepo) instead of discrete cloud backups if you need more version history, since sync snapshots are managed differently from backup snapshots
Example fix
// before
err = model.UploadCloudSnapshot(tag, id)
// after
logs, _ := model.GetCloudRepoTagSnapshots()
if len(logs) >= 12 {
// remove oldest cloud tag to make room
model.RemoveCloudRepoTag(logs[len(logs)-1].ID)
}
err = model.UploadCloudSnapshot(tag, id) Defensive patterns
Strategy: validation
Validate before calling
// Before calling UploadCloudSnapshot, check cloud snapshot count
logs, listErr := model.GetCloudRepoTagSnapshots()
if listErr == nil && len(logs) >= 12 {
// remove oldest snapshot to free a slot
model.RemoveCloudRepoTag(logs[len(logs)-1].ID)
} Prevention
- Monitor cloud snapshot count periodically and prune old snapshots before hitting the 12-snapshot ceiling
- Implement a rotation policy: when creating a new cloud backup, automatically remove the oldest one
- Document the 12-snapshot limit for users who configure automatic cloud backup workflows
When it happens
Trigger: Calling the UploadCloudSnapshot API (or the frontend cloud-backup action behind it) when the cloud repo already holds 12 snapshots. The dejavu repository engine compares the current cloud snapshot count against the constant 12 and returns ErrCloudBackupCountExceeded before the upload begins.
Common situations: A user who has been creating cloud backups regularly without cleaning up old ones eventually hits the 12-snapshot ceiling. This is common for paid subscribers on SiYuan cloud or WebDAV/S3 who rely on frequent automatic backups and never manually prune cloud snapshots.
Related errors
- Backup failed: %s
- --id is required
- Account authentication failed, please login again
- Upload failed: %s
- failed to connect cloud server
AI-assisted analysis of siyuan-note/siyuan@251596fc0d (2026-08-12).
Data as JSON: /api/errors/db2c4243d671414b.
Report an issue: GitHub.