pub struct PgRestoreBuilder { /* private fields */ }
Expand description
pg_restore
restores a PostgreSQL
database from an archive created by pg_dump
.
Implementations§
source§impl PgRestoreBuilder
impl PgRestoreBuilder
sourcepub fn new() -> Self
pub fn new() -> Self
Create a new PgRestoreBuilder
sourcepub fn from(settings: &dyn Settings) -> Self
pub fn from(settings: &dyn Settings) -> Self
Create a new PgRestoreBuilder
from Settings
sourcepub fn program_dir<P: Into<PathBuf>>(self, path: P) -> Self
pub fn program_dir<P: Into<PathBuf>>(self, path: P) -> Self
Location of the program binary
sourcepub fn format<S: AsRef<OsStr>>(self, format: S) -> Self
pub fn format<S: AsRef<OsStr>>(self, format: S) -> Self
backup file format (should be automatic)
sourcepub fn exit_on_error(self) -> Self
pub fn exit_on_error(self) -> Self
exit on error, default is to continue
sourcepub fn use_list<S: AsRef<OsStr>>(self, filename: S) -> Self
pub fn use_list<S: AsRef<OsStr>>(self, filename: S) -> Self
use table of contents from this file for selecting/ordering output
sourcepub fn exclude_schema<S: AsRef<OsStr>>(self, name: S) -> Self
pub fn exclude_schema<S: AsRef<OsStr>>(self, name: S) -> Self
do not restore objects in this schema
sourcepub fn schema_only(self) -> Self
pub fn schema_only(self) -> Self
restore only the schema, no data
sourcepub fn superuser<S: AsRef<OsStr>>(self, name: S) -> Self
pub fn superuser<S: AsRef<OsStr>>(self, name: S) -> Self
superuser user name to use for disabling triggers
sourcepub fn table<S: AsRef<OsStr>>(self, name: S) -> Self
pub fn table<S: AsRef<OsStr>>(self, name: S) -> Self
restore named relation (table, view, etc.)
sourcepub fn no_privileges(self) -> Self
pub fn no_privileges(self) -> Self
skip restoration of access privileges (grant/revoke)
sourcepub fn single_transaction(self) -> Self
pub fn single_transaction(self) -> Self
restore as a single transaction
sourcepub fn disable_triggers(self) -> Self
pub fn disable_triggers(self) -> Self
disable triggers during data-only restore
sourcepub fn enable_row_security(self) -> Self
pub fn enable_row_security(self) -> Self
enable row security
sourcepub fn no_comments(self) -> Self
pub fn no_comments(self) -> Self
do not restore comments
sourcepub fn no_data_for_failed_tables(self) -> Self
pub fn no_data_for_failed_tables(self) -> Self
do not restore data of tables that could not be created
sourcepub fn no_publications(self) -> Self
pub fn no_publications(self) -> Self
do not restore publications
sourcepub fn no_security_labels(self) -> Self
pub fn no_security_labels(self) -> Self
do not restore security labels
sourcepub fn no_subscriptions(self) -> Self
pub fn no_subscriptions(self) -> Self
do not restore subscriptions
sourcepub fn no_table_access_method(self) -> Self
pub fn no_table_access_method(self) -> Self
do not restore table access methods
sourcepub fn no_tablespaces(self) -> Self
pub fn no_tablespaces(self) -> Self
do not restore tablespace assignments
sourcepub fn section<S: AsRef<OsStr>>(self, section: S) -> Self
pub fn section<S: AsRef<OsStr>>(self, section: S) -> Self
restore named section (pre-data, data, or post-data)
sourcepub fn strict_names(self) -> Self
pub fn strict_names(self) -> Self
require table and/or schema include patterns to match at least one entity each
use SET SESSION AUTHORIZATION commands instead of ALTER OWNER commands to set ownership
sourcepub fn host<S: AsRef<OsStr>>(self, hostname: S) -> Self
pub fn host<S: AsRef<OsStr>>(self, hostname: S) -> Self
database server host or socket directory
sourcepub fn no_password(self) -> Self
pub fn no_password(self) -> Self
never prompt for password
sourcepub fn pg_password<S: AsRef<OsStr>>(self, pg_password: S) -> Self
pub fn pg_password<S: AsRef<OsStr>>(self, pg_password: S) -> Self
user password
Trait Implementations§
source§impl Clone for PgRestoreBuilder
impl Clone for PgRestoreBuilder
source§fn clone(&self) -> PgRestoreBuilder
fn clone(&self) -> PgRestoreBuilder
1.6.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl CommandBuilder for PgRestoreBuilder
impl CommandBuilder for PgRestoreBuilder
source§fn get_program(&self) -> &'static OsStr
fn get_program(&self) -> &'static OsStr
Get the program name
source§fn get_program_dir(&self) -> &Option<PathBuf>
fn get_program_dir(&self) -> &Option<PathBuf>
Location of the program binary
source§fn env<S: AsRef<OsStr>>(self, key: S, value: S) -> Self
fn env<S: AsRef<OsStr>>(self, key: S, value: S) -> Self
Set an environment variable for the command
source§fn get_program_file(&self) -> PathBuf
fn get_program_file(&self) -> PathBuf
source§impl Debug for PgRestoreBuilder
impl Debug for PgRestoreBuilder
source§impl Default for PgRestoreBuilder
impl Default for PgRestoreBuilder
source§fn default() -> PgRestoreBuilder
fn default() -> PgRestoreBuilder
Auto Trait Implementations§
impl Freeze for PgRestoreBuilder
impl RefUnwindSafe for PgRestoreBuilder
impl Send for PgRestoreBuilder
impl Sync for PgRestoreBuilder
impl Unpin for PgRestoreBuilder
impl UnwindSafe for PgRestoreBuilder
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)