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
impl AdminEntry
Sourcepub fn new(bin: impl Into<PathBuf>, global_opts: GlobalOpts) -> Self
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.
Sourcepub fn checkpoint(self) -> Admin<CheckPoint<Unselected>>
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.
Sourcepub fn journal(self) -> Admin<Journal>
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.
Sourcepub fn stop(self) -> Admin<Stop>
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.
Sourcepub fn restart(self) -> Admin<Restart>
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.
Sourcepub fn updatespecdepot(self) -> Admin<UpdateSpecDepot<Unselected>>
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.
Sourcepub fn resetpassword(self) -> Admin<ResetPassword<Unselected>>
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.
Sourcepub fn setldapusers(self) -> Admin<SetLdapUsers>
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.
Sourcepub fn end_journal(self) -> Admin<EndJournal>
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.
Sourcepub fn sysinfo(self) -> Admin<SysInfo>
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.
Sourcepub fn resource_monitor(self) -> Admin<ResourceMonitor>
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.
Sourcepub fn replica_filter_reconcile(
self,
) -> Admin<ReplicaFilterReconcile<Unselected>>
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.