skip to content
ccdocs

cc initdb

Restore a database from a dump file.

Usage

cc initdb [name]

Arguments

ArgumentDescription
nameDatabase name to restore into. If omitted, uses the active environment's database.

How It Works

  1. Looks in your configured download directory for .zip dump files
  2. If multiple files are found, lets you choose one
  3. Extracts dump.sql from the zip
  4. Creates the PostgreSQL database if it doesn't exist
  5. Restores the dump via psql
  6. Copies the filestore to ~/.local/share/Odoo/filestore/{db_name} if present
  7. Runs cleanup SQL (removes mail servers, crons, etc.)

Configure Download Directory

cc config

Pick Downloads path from the settings picker and set it to the folder where you save dump files (e.g. ~/Downloads).

Dump Format

CC expects the standard Odoo backup format:

backup.zip
  ├── dump.sql
  └── filestore/   (optional)

On this page