Skip to main content
Glama
northernvariables

FedMCP - Federal Parliamentary Information

02-create-backup-bucket.sh2.13 kB
#!/bin/bash set -e # Load configuration if [ ! -f scripts/gcp-migration/.env ]; then echo "❌ Error: Configuration file not found" echo "Please run ./scripts/gcp-migration/01-setup-gcp.sh first" exit 1 fi source scripts/gcp-migration/.env echo "========================================" echo "Creating GCS Bucket for Neo4j Backups" echo "========================================" echo "" echo "Project: $GCP_PROJECT_ID" echo "Bucket: $BACKUP_BUCKET" echo "Region: $GCP_REGION" echo "" # Check if bucket already exists if gsutil ls -b gs://$BACKUP_BUCKET &> /dev/null; then echo "✅ Bucket already exists: gs://$BACKUP_BUCKET" else # Create bucket echo "📦 Creating bucket..." gsutil mb -p $GCP_PROJECT_ID -c STANDARD -l $GCP_REGION gs://$BACKUP_BUCKET echo "✅ Bucket created" fi # Enable versioning echo "🔄 Enabling versioning..." gsutil versioning set on gs://$BACKUP_BUCKET echo "✅ Versioning enabled" # Set lifecycle policy for automatic cleanup echo "🗑️ Setting lifecycle policy (delete backups after $BACKUP_RETENTION_DAYS days)..." cat > /tmp/lifecycle.json << EOF { "lifecycle": { "rule": [ { "action": {"type": "Delete"}, "condition": { "age": $BACKUP_RETENTION_DAYS, "matchesPrefix": ["backups/"] } }, { "action": {"type": "Delete"}, "condition": { "numNewerVersions": 3, "matchesPrefix": ["backups/"] } } ] } } EOF gsutil lifecycle set /tmp/lifecycle.json gs://$BACKUP_BUCKET rm /tmp/lifecycle.json echo "✅ Lifecycle policy set" # Set bucket permissions echo "🔒 Configuring bucket permissions..." gsutil iam ch allUsers:objectViewer gs://$BACKUP_BUCKET || true echo "✅ Bucket configured" echo "" echo "========================================" echo "✅ Backup Bucket Ready!" echo "========================================" echo "" echo "Bucket details:" gsutil ls -L -b gs://$BACKUP_BUCKET | grep -E "(Location|Storage class|Versioning|Time created)" echo "" echo "Next step: Run ./scripts/gcp-migration/03-export-database.sh"

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/northernvariables/FedMCP'

If you have feedback or need assistance with the MCP directory API, please join our Discord server