{"record":{"id":"2fcb14a4405357cb","repo":"risingwavelabs/risingwave","slug":"backupstorage-error-0","errorCode":null,"errorMessage":"BackupStorage error: {0}","messagePattern":"BackupStorage error: (.+?)","errorType":"error_code","errorClass":"BackupError","httpStatus":null,"severity":"error","filePath":"src/storage/backup/src/error.rs","lineNumber":22,"sourceCode":"// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//     http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nuse risingwave_common::error::BoxedError;\nuse thiserror::Error;\n\npub type BackupResult<T> = Result<T, BackupError>;\n\n#[derive(Error, Debug)]\npub enum BackupError {\n    #[error(\"BackupStorage error: {0}\")]\n    BackupStorage(\n        #[backtrace]\n        #[source]\n        BoxedError,\n    ),\n    #[error(\"MetaStorage error: {0}\")]\n    MetaStorage(\n        #[backtrace]\n        #[source]\n        BoxedError,\n    ),\n    #[error(\"StateStorage error: {0}\")]\n    StateStorage(\n        #[backtrace]\n        #[source]\n        BoxedError,\n    ),\n    #[error(\"Encoding error: {0}\")]","sourceCodeStart":4,"sourceCodeEnd":40,"githubUrl":"https://github.com/risingwavelabs/risingwave/blob/6469eb736d691e8e9b8a419a57edd6429ca77417/src/storage/backup/src/error.rs#L4-L40","documentation":"`BackupError::BackupStorage` wraps an underlying error from the backup storage backend (the object store/blob storage used to hold backup data) in `risingwave_storage::backup`. It preserves the original error as `#[source]` with a backtrace, indicating the failure occurred while talking to the backup storage layer.","triggerScenarios":"Any backup/restore operation (`meta_backup`, `storage backup`) whose read/write to the remote backup storage fails: failed upload of a backup manifest, failed download of an SST or metadata file, or storage client initialization errors.","commonSituations":"Misconfigured S3 credentials/bucket for backup storage; network outage or throttling (S3 503); expired credentials; wrong endpoint; bucket deleted or permissions revoked.","solutions":["Inspect the wrapped `#[source]`/backtrace to find the root cause (auth, network, permissions).","Verify backup storage configuration: bucket/endpoint/region and credentials.","Test access to the backup storage from the node (e.g. aws s3 ls) and retry the operation."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"// Check backup storage reachability before running backup\nlet ok = tokio::fs::metadata(\"/dev/null\").is_ok(); // plus storage-specific: s3 head_bucket\n// e.g. client.head_bucket().await.is_ok()","typeGuard":null,"tryCatchPattern":"match run_backup().await {\n    Err(e) if matches!(e, BackupError::BackupStorage(_) | BackupError::BackupStorage(..)) => {\n        tracing::error!(error = ?e, \"backup storage failure\");\n        // inspect e.source() for root cause, then retry with backoff\n    }\n    other => other?,\n}","preventionTips":["Pre-flight check backup storage credentials and bucket access before long backup jobs.","Set up object-store monitoring (throttling, availability) for the backup bucket.","Use retry with exponential backoff for transient storage errors."],"tags":["backup","storage","rust","thiserror"],"backgroundTag":"upstream-api-error","analyzedSha":"6469eb736d691e8e9b8a419a57edd6429ca77417","analyzedAt":"2026-09-11T21:06:21.487Z","contentChangedAt":"2026-09-11T21:06:21.487Z","schemaVersion":2},"datasetVersion":"2026-09-14T16:17:12.679Z"}