Skip to main content

AdminEntry

Struct AdminEntry 

Source
pub struct AdminEntry { /* private fields */ }
Expand description

Entry point for the p4 admin subcommands.

Allows Perforce superusers to perform administrative tasks even when working from a different machine than the one running the shared Perforce service. Use one of the builder methods to select the operation: checkpoint, journal, stop, restart, updatespecdepot, setldapusers, end_journal, sysinfo, resource_monitor, replica_filter_reconcile, or resetpassword.

Implementations§

Source§

impl AdminEntry

Source

pub fn new(bin: impl Into<PathBuf>, global_opts: GlobalOpts) -> Self

Creates the entry point for p4 admin subcommands.

bin is the path to the Perforce command-line executable.

Source

pub fn checkpoint(self) -> Admin<CheckPoint<Unselected>>

Take a checkpoint.

Equivalent to logging in to the server machine and running p4d -jc [prefix]: a checkpoint is taken and the journal is copied to a numbered file.

Source

pub fn journal(self) -> Admin<Journal>

Rotate the journal.

Equivalent to p4d -jj. The files are created in the server root specified when the Perforce service was started.

Source

pub fn stop(self) -> Admin<Stop>

Stop the Perforce service.

Locks the database to ensure that it is in a consistent state upon restart, and then shuts down the Perforce background process.

Source

pub fn restart(self) -> Admin<Restart>

Restart the Perforce service.

Locks the database, restarts the service, and applies any p4 configure settings that require a restart.

Source

pub fn updatespecdepot(self) -> Admin<UpdateSpecDepot<Unselected>>

Archive stored forms into the spec depot.

Causes the Perforce service to archive stored forms (specifically the client, depot, branch, label, typemap, group, user, and job forms) into the spec depot. Only those forms that have not yet been archived are created. The spec depot must exist first.

Source

pub fn resetpassword(self) -> Admin<ResetPassword<Unselected>>

Force users to change their passwords.

Forces specified users with existing passwords to change their passwords before they can run another command.

Source

pub fn setldapusers(self) -> Admin<SetLdapUsers>

Set the LDAP users.

Converts all existing non-super users to use LDAP authentication. The command changes the AuthMethod field in the user specification for each user from perforce to ldap. If super users want to use LDAP authentication, they must set their AuthMethod manually.

Source

pub fn end_journal(self) -> Admin<EndJournal>

End journal replication at a failover consistency point.

In a failover scenario, this command ends journal replication at the most recent successfully replicated consistency point, returns the journal number and the offset of that consistency point, and stops the standby server’s journalcopy thread.

Source

pub fn sysinfo(self) -> Admin<SysInfo>

Dump system information for Perforce Support.

Dumps the output of reporting commands as run on the server host operating system. This is intended for use under guidance of Perforce Support to gather information about the environment of P4 Server.

Source

pub fn resource_monitor(self) -> Admin<ResourceMonitor>

Report server resource usage.

Explained in the output of p4 help admin-resource-monitor. See also System resources in the Performance tuning chapter of P4 Server Administration Documentation.

Source

pub fn replica_filter_reconcile( self, ) -> Admin<ReplicaFilterReconcile<Unselected>>

Reconcile a replica after its filter rules change.

By default, if the filtering rules change in a replica or edge server spec, replication adjusts automatically; a set of rpl.filter.* configurables controls that behavior. This command performs the reconciliation manually.

Trait Implementations§

Source§

impl Clone for AdminEntry

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for AdminEntry

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for AdminEntry

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.