GITREPOSAV  -  Back up Git Repo to Savf Ifs

<< Click to Display Table of Contents >>

Navigation:  Utility Commands >

GITREPOSAV  -  Back up Git Repo to Savf Ifs

Description

This CL convenience command is used to perform a SAV of the IFS directories and files for the selected local Git repository directories to an IFS save file.

 

You can also use the IBM i SAV command to save a repository to tape or virtual tape library as part of your regular backups.

 

Command Example to save Git IFS repository and related subdirectories from the /gitrepos/QGPL parent directory

GITREPOSAV IFSREPODIR('/gitrepos/QGPL')                 

           DESTIFSFIL('/tmp/qgpl_repo-20190831.svf')    

           TGTRLS(*CURRENT)                             

           REPLACE(*NO)                                 

           WRKLNK(*NO)                                  

           PROMPT(*NO)                                  

 

Parameters

 

IFSREPODIR - Git IFS repo directory to back up. Specify the specific IFS Git repository directory you want to save. If you specify a top level directory you can save all repos under that directory. We are simply building a path for the SAV command t use.

 

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

 

DESTIFSFIL - Destination IFS file for SAVF. This file will contain a copy of the save file data from the SAV operation. Internally we use CPYTOSTMF to copy the save file to an IFS file when the save is complete. This file can be later restored with GITREPORST or by using CPYFRMSTMF to copy it into a save file first and then restoring with the RST command.

 

 

TGTRLS - Target release. The target IBM i release. Default: *CURRENT

 

 

REPLACE - Replace the IFS backup output file Default: *NO

 

Options

*NO - Do not replace the output IFS file for the backup. Backup will cancel if file exists and replace not selected.

 

*YES - Replace the output IFS file.

 

 

WRKLNK - Work with the file after save. Can be used if you want to use WRKLNK to review the file or file attributes interactively. Default: *NO

 

Options

*NO - Do not work with file after save.

 

*YES - Work with file after save.

 

 

PROMPT - Prompt for the SAV command if running interactively. You can review the SAV command command parameter settings. Default: *NO

 

**Note: It's a good idea to prompt for this command the first few times to make sure your save parameters are specified correctly for the SAV command.

 

Options

*NO - Do not prompt for the SAV command.

 

*YES - Prompt for the SAV command.