This procedure assumes that you are updating duplicate repositories that already exist. If you are creating new duplicate repositories, use the How to Clone a Local IPS Package Repository procedure.
This procedure is very similar to the How to Update a Local IPS Package Repository procedure except that this procedure copies the source repository exactly by using the --clone option. The steps in this procedure are very abbreviated. For detail, see How to Update a Local IPS Package Repository.
Before You Begin
Make sure that the repository that will be the source for the clone repositories is current. If necessary, use the How to Update a Local IPS Package Repository procedure to update the source repository before you update the clone repositories.
Make sure you have a current snapshot of the destination repository. Make a ZFS clone of this snapshot.
This step is especially important when making a clone, because the clone (--clone) operation leaves the destination repository altered if an error occurs.
Use the pkgrecv command to duplicate the updated master repository to the copy of the destination repository.
$ pkgrecv -s /net/host1/var/share/pkgrepos/solaris \ -d /net/host2/var/share/pkgrepos/solaris_tmp --clone -p '*'
The -p option clones content from all publishers, in case content was added from a new publisher when the source repository was updated. See the pkgrecv(1) man page for information about the --clone option.
If an error occurs, roll back to the most recent repository snapshot.
If the pkgrecv operation is interrupted, follow the instructions in Resuming an Interrupted Package Receive.
Use the pkgrepo verify command to verify the updated destination repository.
If you are providing the repository through an HTTP interface, restart the SMF service. Be sure to specify the appropriate service instance when you restart the service.
When you are satisfied that your updated repository is working correctly, remove the old repository.
See Also
If you are providing the repository through an HTTP interface, see the following related documentation:
Serving Multiple Repositories Using Web Server Access describes how to serve multiple repositories using multiple pkg.depotd daemons running on different ports.
Multiple Repositories Under One Domain describes how to run multiple repositories under one domain name with different prefixes.