Template:SQWareProduction sqwcas Backup.ksh example

From Wiki_dbSQWare
Revision as of 15:13, 26 April 2024 by BatchUser (talk | contribs) (Updated by BatchUser)
Jump to: navigation, search
Sourcing sqwcas_Global.lib v2024.03 SQWareProduction for Cassandra (dbSQWare) ... 

#Standard help for script sqwcas_Backup.ksh:

$gvsqw_CasBin/sqwcas_Backup.ksh -h
#Display online help for this script

$gvsqw_CasBin/sqwcas_Backup.ksh -Locale en -h
#Display online help for this script with forcing of the 'en' locale (by default locale managed by $gvsqw_Locale)

$gvsqw_CasBin/sqwcas_Backup.ksh -s
#Display usage examples for this script

$gvsqw_CasBin/sqwcas_Backup.ksh -I $CAS_SID -Type <BackupType>
#Display generated commands without execute them !

$gvsqw_CasBin/sqwcas_Backup.ksh -I $CAS_SID -Type <BackupType> -HI 4 -Exec
#Execute backup with the selected type of backup : 'full' (snapshot) or 'inc' (backup), and keep 4 historical backup

$gvsqw_CasBin/sqwcas_Backup.ksh -I $CAS_SID -Type <BackupType> -S <Scope> -HI <NumberOfGenerations> -Exec
#Changes the scope <Scope> of execution (local by default) and the number of backup generations <NumberOfGenerations> to keep (by default 2), manage by $gvsqw_backupNbGeneration)

$gvsqw_CasBin/sqwcas_Backup.ksh -I $CAS_SID -Type <BackupType> -NoDelete -Exec
#Retains backup history (by default 2, managed by $gvsqw_backupNbGeneration)

$gvsqw_CasBin/sqwcas_Backup.ksh -I $CAS_SID -Type <BackupType> -AGR 20 -Exec
#Set the waiting time in seconds between two command run, 20s here (by default is 0 manage by $lvsqw_AggressivenessRun)

$gvsqw_CasBin/sqwcas_Backup.ksh -I $CAS_SID -Type <BackupType> -AGE 40 -Exec
#Set the waiting time in seconds between two end checks, 40s here (by default is 5 manage by $lvsqw_AggressivenessCheckEnd)

$gvsqw_CasBin/sqwcas_Backup.ksh -I $CAS_SID -Type <BackupType> -P <NumericValue> -Exec
#Run sqwcas_Backup.ksh script with a parallel degree of '<NumericValue>'
#Use by default the variable gvsqw_NbThreadXXX in $gvsqw_<gvsqw_RdbmsTrigram>/../etc/sqw<gvsqw_RdbmsTrigram>_GlobalVar.cfg
#You can change this default on all your environnement if you set this variable
#in configuration file $gvsqw_<gvsqw_RdbmsTrigram>/../etc_cust/sqw<gvsqw_RdbmsTrigram>_GlobalVar.cfg

$gvsqw_CasBin/sqwcas_Backup.ksh -I $CAS_SID -Type <BackupType> -AddMail 'mymail1@mydomaine.com,mymail2@mydomaine.com' -Exec
#Add the mail list to the default address managed by $gvsqw_GlobalMail (only this time), if needed separate by commas

$gvsqw_CasBin/sqwcas_Backup.ksh -I $CAS_SID -Type <BackupType> -SendReport -Exec
#Send the log by email at the end of the treatment even if there is no error (by default, send on error)

$gvsqw_CasBin/sqwcas_Backup.ksh -I $CAS_SID -Type <BackupType> -NoMail -Exec
#Disables sending an email on error to $gvsqw_GlobalMail (by default, send on error)

$gvsqw_CasBin/sqwcas_Backup.ksh -I $CAS_SID -Type <BackupType> -FRT <NumericValue> -Exec
#Force return code to '<NumericValue>' on error (if no error, "exit 0!")
#You can also force return code of this script on all your
#environnement if you set the variable: $gvsqw_ForcedReturnCodeScript_sqwcas_Backup=<NumericValue>
#in configuration file $gvsqw_CasBin/../etc_cust/sqwcas_GlobalVar.cfg