[ADD] dumpdb: doc
This commit is contained in:
parent
debf57bac3
commit
e9e02d450d
46
README.md
46
README.md
|
|
@ -40,6 +40,7 @@ and provides helpers to run (and replay) migrations until it works.
|
|||
* [Command ``generate-module-analysis`` (BETA)](#command-generate-module-analysis)
|
||||
* [Command ``estimate-workload`` (BETA)](#command-estimate-workload)
|
||||
* [Command ``psql``](#command-psql)
|
||||
* [Command ``dumpdb``](#command-dumpdb)
|
||||
|
||||
<a name="installation"/>
|
||||
|
||||
|
|
@ -435,3 +436,48 @@ Result:
|
|||
```
|
||||
|
||||
See all the options here https://www.postgresql.org/docs/current/app-psql.html
|
||||
|
||||
<a name="command-dumpdb"/>
|
||||
|
||||
## Command: ``dumpdb``
|
||||
|
||||
**Prerequites:** init
|
||||
|
||||
```
|
||||
odoo-openupgrade-wizard dumpdb
|
||||
--database DB_NAME
|
||||
--database-path DATABASE_PATH
|
||||
--filestore-path FILESTORE_PATH
|
||||
```
|
||||
|
||||
Dump the database DB_NAME to DATABASE_PATH and export the filestore
|
||||
related to DB_NAME into FILESTORE_PATH. To choose the format of the
|
||||
backup files look at the `--database-format` and `--filestore-format`.
|
||||
|
||||
*WARNING*: DATABASE_PATH should be a sub directory of the project path
|
||||
in orter to have the postgresql container able to write the dump file.
|
||||
For example, the project path is `/path/to/myproject` (where you run the
|
||||
`init` command), then DATABASE_PATH can be any of the subdirectory of
|
||||
`/path/to/myproject`.
|
||||
|
||||
**Optional arguments**
|
||||
|
||||
* To chose the database format use `--database-format`. Format can be
|
||||
one of the following:
|
||||
- `p` for plain sql text
|
||||
- `c` for custom compressed backup of `pg_dump`
|
||||
- `d` for directory structure
|
||||
- `t` for a tar version of the directory structure
|
||||
See also https://www.postgresql.org/docs/current/app-pgdump.html
|
||||
The default database format is `c`.
|
||||
|
||||
* To chose the filestore format use `--filestore-format`. Format can be
|
||||
one of the following:
|
||||
- `d` copy of the directory structure
|
||||
- `t` tar version of the directory structure (not compressed)
|
||||
- `tgz` tar version of the directory structure compressed with gzip.
|
||||
The default filestore format is `tgz`.
|
||||
|
||||
* By default, if database file or filestore file already exists, the
|
||||
command will fail, preserving the existing dump. If you need to
|
||||
overwrite the existing files, the `--force` option can be used.
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user