| ARTICLE INFO | |||
| Issue ID | NA | Support Ticket | SUPPORT-1068 |
| Environment | YugabyteDB Anywhere | Component | Backup & Restore (GCS) |
| Affected Versions | All | Fixed Version | NA |
Problem
On universes that back up to Google Cloud Storage (GCS), backup deletions may appear to fail, stall, or succeed in the UI while objects remain in the bucket and the default YBA logs give no useful detail.
Error / alert observed: default application.log shows only a generic line with no HTTP-level cause:
Backup <uuid is successfully deleted
Impact: Retention policies do not free storage, creating a compliance risk if old backups must be removed. Operators cannot tell whether the cause is IAM, GCS-side, network/proxy, or stale YBA metadata.
Scope: This procedure covers GCS calls made by the YBA platform Java process (BackupGarbageCollector, storage-config validation, key-file deletion). It does not cover YB-Controller (YBC) node-side backup data paths see Limitations.
Cause
YBA uses the GCP Java SDK to talk to GCS. By default, the com.google.cloud and com.google.api loggers run at WARN, and the HTTP transport does not print request/response detail. A failure therefore collapses into a single application-level line with no visibility into:
- OAuth2 token acquisition (
oauth2.googleapis.com) - Permission denials (
403onstorage.buckets.getor object APIs) - Partial batch-delete failures (
500on individual objects in a batch) - Proxy or service-mesh interception (
502on metadata or token endpoints)
Enabling SDK debug logging exposes each HTTP call so you can see exactly where the deletion flow stopped.
Diagnosis
Step 1 — Confirm the symptom in YBA
- Open Universes → <universe → Backups.
- Note the backup UUID and state (Expired, Deleting, or Failed).
- Check Tasks for a
Delete Backup/ BackupGarbageCollector task and its error text.
If the UI shows success but GCS still holds objects, continue with SDK logging. YBA may have updated metadata while the GCS cleanup failed silently or partially.
Step 2 — Enable GCP SDK debug logging on the YBA node
Reason: GOOGLE_SDK_JAVA_LOGGING=true turns on the SDK HTTP logger; DEBUG on com.google.cloud and com.google.api ensures those lines reach application.log.
2a. Systemd environment — edit the YBA service file:
sudo vi /etc/systemd/system/yb-platform.service
Add under [Service]:
Environment="GOOGLE_SDK_JAVA_LOGGING=true"
2b. logback.xml — edit logback for your installed YBA version:
sudo vi /opt/yugabyte/software/<version/yb-platform/yugaware/conf/logback.xml
Add before the <root element:
<logger name="com.google.cloud" level="DEBUG" / <logger name="com.google.api" level="DEBUG" /
2c. Restart YBA:
sudo systemctl daemon-reload sudo yba-ctl restart
WARNING: Restarting YBA briefly interrupts the platform UI and in-flight tasks. Schedule this during a maintenance window on production controllers.
Step 3 — Reproduce and inspect
Delete an expired backup from the UI (or wait for the next garbage-collection cycle), then inspect the logs:
grep -E 'HttpTransport|backupGC|BackupGarbageCollector|successfully deleted' \ /opt/yugabyte/yb-platform/yugaware/logs/application.log | tail -100
Expected (healthy) flow:
| Step | HTTP call | Success signal |
|---|---|---|
| Auth | POST https://oauth2.googleapis.com/token |
200 OK |
| Validate config | GET .../b/<bucket/o?delimiter=/&maxResults=1 |
200 OK |
| Delete key metadata | DELETE .../backup_keys.json |
204 or 404 (404 = already gone) |
| List objects | GET .../o?prefix=... |
200 with object list |
| Batch delete | POST .../batch/storage/v1 |
Sub-responses 204 per object |
| Verify | Second GET .../o?prefix=...
|
Empty listing |
Step 4 — Map HTTP errors to fixes
| Log pattern | Likely cause | Next step |
|---|---|---|
403 Forbidden on bucket/object API |
Service account missing IAM role | Grant storage.objectAdmin (or the minimum roles per GCS backup docs) |
502 / timeout on 169.254.169.254 or token URL |
Istio/Envoy or proxy blocking metadata | Allow the metadata server and oauth2.googleapis.com from YBA pods/VMs |
Batch response mix of 204 and 500
|
GCS-side transient / object-level issue | Retry; check bucket region and object holds/locks |
| UI success + empty batch list | Stale YBA DB rows only | See Resolution → stale metadata |
Resolution
There is no single config change that fixes all deletion issues, use the diagnosis to choose the path.
-
IAM / permissions are the cause. Update the GCS service account on the backup config with list, get, and delete permission on the backup prefix.
Reason: BackupGarbageCollector must list and batch-delete objects under the universe backup path; a missingstorage.buckets.getor object-delete permission produces403in the SDK logs. Re-run deletion after IAM propagation (usually minutes). -
Deletion succeeds in GCS but the UI still lists the backup. YBA metadata can retain rows when storage and DB state diverge.
WARNING: Only proceed after confirming the objects are actually gone in GCS (SDK re-list shows an empty prefix). Work with Yugabyte Support for the metadata-cleanup SQL, do not run ad-hoc deletes on the YBA database without a support-approved runbook.
-
Only YBC / node-side files are involved. SDK logging on YBA will not show YBC GCS traffic. Collect YBC logs on the DB nodes:
ls /home/yugabyte/controller/logs/
Verification
- SDK logs show a full delete flow ending in an empty re-list for the backup prefix.
- The YBA UI no longer lists the backup (or the task shows Completed).
- Optional: the
ybp_delete_backup_failurePrometheus metric does not increase after the fix.
Additional Information
Debug logging is a diagnostic aid, not a steady-state setting. After the investigation, disable it. It can generate GB/day of logs.
- Remove
Environment="GOOGLE_SDK_JAVA_LOGGING=true"fromyb-platform.service. - Remove or comment the two DEBUG
<loggerlines inlogback.xml. - Restart:
sudo systemctl daemon-reload sudo yba-ctl restart
Limitations: This procedure is GCS-specific (the Java SDK). YBC uses a C++ client — use controller logs for those paths. Authorization headers are redacted in the logs, but still treat the logs as sensitive before sharing externally.
Comments
0 comments
Please sign in to leave a comment.