Skip to content

Add GCS bucket version audit and restore scripts#31

Draft
anth-volk wants to merge 1 commit intomainfrom
gcs-version-restore-scripts
Draft

Add GCS bucket version audit and restore scripts#31
anth-volk wants to merge 1 commit intomainfrom
gcs-version-restore-scripts

Conversation

@anth-volk
Copy link
Contributor

Summary

  • Adds gcp/gcs_version_audit.py — a read-only script that lists all object versions in a GCS bucket and classifies what action would be needed to revert each file to its state at a target date
  • Adds gcp/gcs_restore.py — a restore script that reverts objects to a target date, with dry-run by default and interactive confirmation before making changes

Both scripts require google-cloud-storage and GCP credentials. Object versioning must be enabled on the target bucket.

Closes #30

Test plan

  • Run gcs_version_audit.py with --limit=5 against a test bucket to verify version listing
  • Run gcs_restore.py without --execute to verify dry-run output
  • Run gcs_restore.py --execute against a test bucket and confirm objects are restored

🤖 Generated with Claude Code

Closes #30

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add GCS bucket version audit and restore scripts

1 participant