{"record":{"id":"42aaf8e86d8969b1","repo":"siyuan-note/siyuan","slug":"conf-language-84","errorCode":null,"errorMessage":"Conf.Language(84)","messagePattern":"Conf\\.Language\\(84\\)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"kernel/model/repository.go","lineNumber":1489,"sourceCode":"\tswitch Conf.Sync.Provider {\n\tcase conf.ProviderSiYuan:\n\t\tif !IsSubscriber() {\n\t\t\tutil.PushErrMsg(Conf.Language(29), 5000)\n\t\t\treturn\n\t\t}\n\tcase conf.ProviderWebDAV, conf.ProviderS3, conf.ProviderLocal:\n\t\tif !IsPaidUser() {\n\t\t\tutil.PushErrMsg(Conf.Language(214), 5000)\n\t\t\treturn\n\t\t}\n\t}\n\n\tutil.PushEndlessProgress(Conf.Language(116))\n\tdefer util.PushClearProgress()\n\tuploadFileCount, uploadChunkCount, uploadBytes, err := repo.UploadTagIndex(tag, id, map[string]any{eventbus.CtxPushMsg: eventbus.CtxPushMsgToStatusBarAndProgress})\n\tif err != nil {\n\t\tif errors.Is(err, dejavu.ErrCloudBackupCountExceeded) {\n\t\t\terr = fmt.Errorf(Conf.Language(84), Conf.Language(154))\n\t\t\treturn\n\t\t}\n\t\terr = fmt.Errorf(Conf.Language(84), formatRepoErrorMsg(err))\n\t\treturn\n\t}\n\tmsg := fmt.Sprintf(Conf.Language(152), uploadFileCount, uploadChunkCount, humanize.BytesCustomCeil(uint64(uploadBytes), 2))\n\tutil.PushMsg(msg, 5000)\n\tutil.PushStatusBar(msg)\n\treturn\n}\n\nfunc RemoveCloudRepoTag(tag string) (err error) {\n\tif 1 > len(Conf.Repo.Key) {\n\t\terr = errors.New(Conf.Language(26))\n\t\treturn\n\t}\n\n\trepo, err := newRepository()","sourceCodeStart":1471,"sourceCodeEnd":1507,"githubUrl":"https://github.com/siyuan-note/siyuan/blob/afa823b6b4e4f183511e0bc0a3be93caa94c7c97/kernel/model/repository.go#L1471-L1507","documentation":"UploadCloudSnapshot (kernel/model/repository.go:1486-1491) maps dejavu.ErrCloudBackupCountExceeded from repo.UploadTagIndex to fmt.Errorf(Conf.Language(84), Conf.Language(154)), producing 'Backup failed: The cloud can only support backup up to 12 snapshots'. The SiYuan cloud backup service enforces a hard cap of 12 retained snapshots; the upload is rejected before new chunks are stored. This branch is specific to the SiYuan cloud provider path (the WebDAV/S3/local paths only check paid status up front).","triggerScenarios":"POST /api/repo/uploadCloudSnapshot {tag, id} against the SiYuan cloud provider when 12 cloud snapshots already exist and retention settings have not evicted any, or when stale tagged snapshots from old devices all count toward the cap.","commonSituations":"Long-lived installs backing up to SiYuan cloud daily with the default retention; multiple devices sharing the cloud account each uploading snapshots; old tag snapshots (e.g. 'clean'/'reset' tags) never deleted and consuming all 12 slots.","solutions":["Delete the oldest cloud snapshots via Settings - Cloud or POST /api/repo/removeCloudRepoTagSnapshot {tag} for stale tags, then retry the upload","Run POST /api/repo/purgeCloudRepo to purge cloud data, then re-upload the current snapshot","Lower cloud snapshot retention (Settings - Account & Sync) so old snapshots age out automatically before hitting the 12 cap","If more retention is genuinely needed, switch the sync provider to WebDAV or S3 (PRO), which do not enforce the 12-snapshot cloud cap"],"exampleFix":"// before\nawait fetchSyncPost(\"/api/repo/uploadCloudSnapshot\", {tag, id}); // Backup failed: ... up to 12 snapshots\n\n// after\nawait fetchSyncPost(\"/api/repo/removeCloudRepoTagSnapshot\", {tag: oldestTag});\nawait fetchSyncPost(\"/api/repo/uploadCloudSnapshot\", {tag, id});","handlingStrategy":"retry","validationCode":"// pre-flight: count cloud snapshots and free a slot before uploading\nconst res = await fetchSyncPost(\"/api/repo/getCloudRepoSnapshots\", {page: 1});\nif (res.data.totalCount >= 12) {\n    await fetchSyncPost(\"/api/repo/removeCloudRepoTagSnapshot\", {tag: oldestUnusedTag});\n}","typeGuard":"function cloudSlotsAvailable(totalCount: number, cap = 12): boolean {\n    return totalCount < cap;\n}","tryCatchPattern":"try {\n    await fetchSyncPost(\"/api/repo/uploadCloudSnapshot\", { tag, id });\n} catch (e: any) {\n    if (e.message?.includes(window.siyuan.languages[154])) {\n        // remove one old cloud snapshot, then retry the upload exactly once\n    }\n}","preventionTips":["Prune old cloud snapshots (or lower retention) on a schedule so the 12-snapshot ceiling never triggers mid-backup","Use tags sparingly - every tagged cloud snapshot counts toward the cap","Monitor totalCount from getCloudRepoSnapshots and alert before it reaches 12"],"tags":["cloud-sync","backup","quota","repository"],"backgroundTag":"cloud-backup-limit-exceeded","analyzedSha":"afa823b6b4e4f183511e0bc0a3be93caa94c7c97","analyzedAt":"2026-08-18T17:04:10.865Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}