skip to content
ccdocs

cc copy

Creates a snapshot copy of a PostgreSQL database. The copy is stored as <db_name>-CC-COPY and can be restored later with cc restore.

Usage

cc copy [DB_NAME]

If no database name is given, CC reads it from the active environment's linked database (falling back to settings detection on the workspace path).

Example

cc copy my_project_v17
# → Copies my_project_v17 → my_project_v17-CC-COPY

cc copy
# → Detects DB from the active environment and copies it

If a copy already exists, it is dropped and recreated.

  • cc restore — restore the copy back to the original database

On this page