cc initdb

Restore a database from a dump file.

Usage

cc initdb [name]

Arguments

Argument
Description

name

Database 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

Set Download path to the folder where you save dump files (e.g. ~/Downloads).

Dump Format

CC expects the standard Odoo backup format:

Last updated

Was this helpful?