It is possible to automatise nearly every administration task on commandline scripts in infromatica.
In case of migrations you can for example to a full export /reimport of a repository with a simple commandline script.
To begin with a useful command is:
pmrep
First let us connect to the server
%rootpath_infa%\server\bin\pmrep connect -r RepositoryName -d YourDomainname -n username -x password
once you are logged in lets do a backup of the repository to a file
%rootpath_infa%\server\bin\pmrep backup -o RepositoryToBackup
-> the backup file will be put at this place on the disk
%rootpath_infa%\server\infa_shared\Backup\
The next command is used to do administrative tasks on the server (disable service, update service parameters)
infacmd
First let us disable the rpository service:
\server\bin\infacmd DisableService -dn domainname -un adminuser -pd adminuserpassword -sn repositoryname -mo Abort
once done let us put the repository in exclusive mode to be able to restore a bakup:
\server\bin\infacmd updateRepositoryService -dn domainname -un adminuser -pd adminuserpassword -sn repositoryname -so OperatingMode=Exclusive
now let us delete the content
\server\bin\pmrep connect -r repositoryname -d domainname -n adminuser -x adminuserpassword
\server\bin\pmrep delete -x adminuserpassword
and finally restore the bakup (after having copied the file to the path:%rootpath_infa%\server\infa_shared\Backup\ )
\server\bin\pmrep connect -r repositoryname -d domainname
\server\bin\pmrep restore -u adminuser -p adminuserpassword -i backup_repositoryname
To set back the server in operational mode
\server\bin\pmrep connect -r prod -d %domain_cible% -n adminuser -x adminuserpassword
\server\bin\infacmd updateRepositoryService-dn domainname -un adminuser -pd adminuserpassword -sn repositoryname -so OperatingMode=Normal
Leave a Reply
You must be logged in to post a comment.