This CL convenience command is used to perform a RST of the IFS directories and files for the selected local Git repository directories from an IFS save file.
You can also use the IBM i RST command to save a repository to tape or virtual tape library as part of your regular backups.
Command Example to restore a Git IFS repository and related subdirectories saved from the /gitrepos/QGPL parent directory to a new directory named /gitrestoretemp/QGPL.
SRCIFSFILE - Source IFS file for SAVF. This file will contain a copy of the save file data to restore from the previous GITREPOSAV or other SAV operation. Internally we use CPYFRMSTMF to copy the binary save file from an IFS file before restoring.
IFSREPODIR - Git IFS repo directory to restore. Specify the specific IFS Git repository directory you want to restore. Be careful when restoring so you don't overlay your repositories if you are restoring from a master backup of all repositories in a master repo directory like /gitrepos where there may be multiple repositories living within the directory.
For our conventions, there is a master repository directory called /gitrepos and each repository live as a child directory under /gitrepos. Example for QGPL: /gitrepos/QGPL
NEWOBJNAME - Restore to directory. This setting can be used to tell the RST command the new destination IFS directory where you want to restore your repo. Default: *SAME
Sometimes you may want to restore the original directory to another location so you can access old source members without messing up the current Git repository IFS directory. Restoring to a new IFS location is the best way to do that.
Specify the new IFS directory location to restore to. The IFS path will be created if it does not exist.
*SAME - Use this option to overwrite the existing repository or restore under the original repository name if restoring to a new system.
In the example at the top of this section we restore a repo saved from /gitrepos/QGPL to /gitrestoretemp/QGPL
PROMPT - Prompt for the RST command if running interactively. You can review the RST command command parameter settings. Default: *YES
**Note: It's a good idea to prompt for this command to make sure your restore parameters are specified correctly for the RST command.
*NO - Do not prompt for the RST command.
*YES - Prompt for the RST command.