Roll back failed deployments, restore previous versions, and manage deployment emergencies. Use this when deployments fail, critical bugs are found in production, performance degrades after a release, or emergency recovery is required.
# List recent deployments
vercel list
# Promote a specific deployment to production
vercel promote <deployment-url>
# Or rollback to previous production deployment
vercel rollback
# Rollback last migration
pnpm -F /database db:rollback
# Rollback to specific migration
pnpm -F /database db:rollback --to 20240115_initial
# Restore from backup
pg_dump $DATABASE_URL > backup-pre-deploy.sql # Before deploy
psql $DATABASE_URL < backup-pre-deploy.sql # Restore if needed
# Revert specific commit
git revert <commit-hash>
git push origin main # Triggers Vercel redeploy
# Create rollback branch
git checkout -b rollback/v1.1.0
git reset --hard v1.1.0
git push origin rollback/v1.1.0
gh pr create --title "Rollback to v1.1.0" --body "Emergency rollback"
# Revalidate Next.js cache
curl -X POST "https://motormetrics.app/api/revalidate?tag=all&secret=$REVALIDATE_TOKEN"
# Clear Redis cache
redis-cli -h $REDIS_HOST FLUSHALL
curl -f https://motormetrics.app || echo "Web unhealthy"
psql $DATABASE_URL -c "SELECT 1" || echo "Database unreachable"
Pre-Rollback:
During:
Post:
Critical Bug:
vercel rollback
curl https://motormetrics.app/api/health
Database Migration Failure:
pnpm -F /database db:rollback
git revert HEAD
git push origin main
Rollback deployment not working:
# Force redeploy from known good commit
git checkout v1.1.0
vercel --prod
Database schema mismatch:
pnpm -F /database db:rollback
# Or restore backup: psql $DATABASE_URL < backup-pre-deploy.sql
monitoring skill for debugging issuesSearch for places (restaurants, cafes, etc.) via Google Places API proxy on localhost.
Interact with GitHub using the `gh` CLI. Use `gh issue`, `gh pr`, `gh run`, and `gh api` for issues, PRs, CI runs, and advanced queries.
Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
Start voice calls via the OpenClaw voice-call plugin.
Notion API for creating and managing pages, databases, and blocks.
Gemini CLI for one-shot Q&A, summaries, and generation.
Category:developer