db-backup-restore

Dumps a remote PostgreSQL database via SSH and restores it to local Docker Compose.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/Witroch4/witdev-skills --skill db-backup-restore
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: db-backup-restore
Source: https://github.com/Witroch4/witdev-skills/tree/main/db-backup-restore
Command: npx skills add https://github.com/Witroch4/witdev-skills --skill db-backup-restore

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill automates the process of backing up a production PostgreSQL database and restoring it into a local Docker Compose development environment, ensuring your local data is up-to-date with production.

Core Features & Use Cases

  • Production to Dev Sync: Dumps a remote PostgreSQL database via SSH and restores it to a local Dockerized instance.
  • Database Refresh: Quickly refresh your local development database with the latest production data.
  • Use Case: When a developer needs to debug an issue that only occurs with production data, they can use this skill to get an exact copy of the production database locally.

Quick Start

Use the db-backup-restore skill to dump the production database and restore it to the local development environment.

Frequently Asked Questions about db-backup-restore

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I sync a production PostgreSQL database to a local Docker Compose instance?

To sync a production PostgreSQL database to a local Docker Compose instance, this skill dumps the remote database via SSH using pg_dump and restores it locally with pg_restore. It uses custom format dumps to ensure efficient data transfer and accurate local restoration.

Can I restore a remote PostgreSQL backup into a local Dockerized development environment?

Yes, you can restore a remote PostgreSQL backup into a local Dockerized development environment. The skill connects to your production server via SSH, extracts the database, and automatically restores it into your local Docker Compose PostgreSQL setup.

What is the best way to refresh local development data with an exact copy of a production database?

The best way to refresh local development data with a production database is using an automated dump and restore process. This skill creates a custom format dump from your remote server and restores it locally, providing an exact production copy for debugging.

Does this database restore process work with any Dockerized PostgreSQL setup?

Yes, the database restore process works with any Dockerized PostgreSQL setup. By leveraging standard pg_dump and pg_restore utilities with custom format dumps, it supports any Docker Compose PostgreSQL instance without requiring specific Docker configurations.

Do I need SSH access to dump a production database for local development?

Yes, you need SSH access to dump a production database for local development. The skill securely connects to the remote production server via SSH to execute pg_dump and transfer the custom format database dump to your local environment.

Why use custom format dumps for PostgreSQL backup and restore?

You use custom format dumps for PostgreSQL backup and restore because they enable efficient data transfer and flexible restoration. The skill leverages pg_dump and pg_restore with custom formats to quickly sync large production datasets into local Docker containers.