pub struct Dump {
pub passwd: String,
pub db_name: String,
pub format: DumpFormat,
}
Expand description
Dump (backup) a database, optionally including the filestore folder
Note that this request may take some time to complete, and it’s likely worth only firing this from an async-type client
Note that the data is returned a base64-encoded buffer.
§Example
use odoo_api::service::db::DumpFormat;
let resp = client.db_dump(
"master-password",
"database-to-dump",
DumpFormat::Zip
).send()?;
// parse the returned b64 string into a byte array
// e.g., with the `base64` crate: https://docs.rs/base64/latest/base64/
let data: Vec<u8> = base64::decode(&resp.b64_bytes)?;
// write the data to a file ...
Reference: odoo/service/db.py
See also: odoo/service/db.py
Fields§
§passwd: String
The Odoo master password
db_name: String
The database to be backed-up
format: DumpFormat
The dump format. See DumpFormat
for more info
Trait Implementations§
Source§impl JsonRpcParams for Dump
impl JsonRpcParams for Dump
type Container<T> = OdooApiContainer<Dump>
type Response = DumpResponse
fn build(self, id: JsonRpcId) -> JsonRpcRequest<Self>
Source§impl OdooApiMethod for Dump
impl OdooApiMethod for Dump
Source§fn describe(&self) -> (&'static str, &'static str)
fn describe(&self) -> (&'static str, &'static str)
Describe the JSON-RPC service and method for this type
Source§fn endpoint(&self) -> &'static str
fn endpoint(&self) -> &'static str
Describe method endpoint (e.g., “/web/session/authenticate”)
Source§fn _build(self, id: JsonRpcId) -> JsonRpcRequest<Self>
fn _build(self, id: JsonRpcId) -> JsonRpcRequest<Self>
Build
self
into a full JsonRpcRequest
Auto Trait Implementations§
impl Freeze for Dump
impl RefUnwindSafe for Dump
impl Send for Dump
impl Sync for Dump
impl Unpin for Dump
impl UnwindSafe for Dump
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more