Awesome-omni-skill sync-db
This skill should be used when the user asks to "sync database", "get production data", "download prod db", "migrate database", "update local db", "refresh dev database", or needs to sync production data to local/dev environment.
install
source · Clone the upstream repo
git clone https://github.com/diegosouzapw/awesome-omni-skill
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/diegosouzapw/awesome-omni-skill "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/development/sync-db" ~/.claude/skills/diegosouzapw-awesome-omni-skill-sync-db && rm -rf "$T"
manifest:
skills/development/sync-db/SKILL.mdsource content
Sync Production Database to Development
Run the database migration script to sync production data to local development environment.
Prerequisites
- Virtual environment must be activated:
source backend/env/bin/activate - AWS CLI configured with Parameter Store access
- Docker installed (for database operations)
Script Location
backend/scripts/migrate-prod-to-dev.sh
Usage Options
Download Production Database Only (Safest)
cd backend/scripts ./migrate-prod-to-dev.sh --download
Downloads production database to
backend/backups/ without making any local changes.
Upload Latest Dump to Dev Database
cd backend/scripts ./migrate-prod-to-dev.sh --upload
Restores the most recent backup file to development database.
Run Django Migrations and Create Admin User Only
cd backend/scripts ./migrate-prod-to-dev.sh --setup
Runs migrations and creates/updates admin user (
dev@genlayer.foundation / password).
Full Migration (Download + Upload + Setup)
cd backend/scripts ./migrate-prod-to-dev.sh
Complete workflow: download production data, restore to dev, run migrations, and create admin.
What It Does
- Fetches production database credentials from AWS Parameter Store
- Downloads production PostgreSQL database using Docker (matching version)
- Restores to development database (local or AWS dev instance)
- Runs Django migrations
- Creates/updates admin user with Steward role
Notes
- Backups are saved to
with timestampsbackend/backups/ - Uses Docker to avoid PostgreSQL version mismatch issues
- See
for detailed documentation and troubleshootingbackend/scripts/README.md