Skip to content

restore

Sébastien Andreatta edited this page Apr 27, 2026 · 2 revisions

odev restore

restore demo

Restore a dump file on the local filesystem to a database. This will effectively replace all data in the target database.

Usage

odev restore [-v {CRITICAL,ERROR,WARNING,INFO,DEBUG,DEBUG_SQL,NOTSET}] [-h] [-f] [-p {local}] [-b BRANCH] [--no-neutralize] database backup

Aliases

No aliases

Arguments

Positional Arguments:

Argument Description
database The database to target.
backup Path to the backup file to restore.

Optional Arguments:

Argument Description
-v, --log-level Set logging verbosity for the execution of odev.
-h, --help Show help for the current command.
-f, --force Bypass confirmation prompts and assume a default value to all, use with caution!
-p, --platform Force searching for the database on the specified platform, useful when different databases have the same name on different hosting (usually one local database being a copy of a remote one). One of local.
-b, --branch The branch to target, only used with PaaS (Odoo SH) databases to force using a specific branch after project detection.
--no-neutralize Do not neutralize the database after the dump has been restored. Only used on local databases.

Examples

Show help

odev restore --help

Restore a dump file to a database (Restore from a zip file)

odev restore demo_new /path/to/backup.zip

Restore without neutralization

odev restore --no-neutralize demo_new /path/to/backup.zip

Force restore (Overwrite existing DB)

odev restore -f demo_existing /path/to/backup.zip

Clone this wiki locally