What Android Has That iOS Has Not (Yet)

Advertisements

With 35M Unique Viewers A Month, Twitch Hires An In-House Ad Sales Team To Ramp Up Monetization

I watch twitch TV a lot

Informatica Backup Script

Hi,

Its been a while since I posted, today a wrote a quick script that will take a backup of Informatica .rep file and store it in a specified location. The script works in any Unix/Linux based system if you create a cron job for how often you want to take the backup the script will do the rest.

The script needs some parameters to work effectively if you add you settings then the rest of the script should work without an issue.


#!/bin/ksh
 #
 # +############################################################+
 # # #
 # # Author: Andrew Pazikas #
 # # Date : 05/06/13 #
 # # Desc : Takes a backup of Informatica Metadata #
 # # Change Log: #
 # # 05/06/13 Andrew Pazikas Initial version #
 # # #
 # # #
 # # #
 # +############################################################+
 #set -x

. $HOME/.profile

export BACKUP_DIR='where you want to store your backups'
 export INFA_REPO_NAME='Informatica Repository Name'
 export INFA_DOMAIN_NAME='Informatica Domain Name'
 export INFA_USER='Informatica User Namer'
 export INFA_PASS='Informatica Password '
 export DAYS_TO_KEEP_BACKUP=30
 export LOG_HOME='location on where you want to keep the backup log'
 #########Take backup of Infa Repo##############
 cd $INFA_HOME

pmrep connect -r $INFA_REPO_NAME -d $INFA_DOMAIN_NAME -n $INFA_USER -x $INFA_PASS > $LOG_HOME/pmrep_conn.log

pmrep backup -o $BACKUP_DIR/infa_repo_backup_$(date +%y%m%d).rep
 #########Remove files older than DAYS_TO_KEEP_BACKUP #########
 cd $BACKUP_DIR
 find . -mtime +$DAYS_TO_KEEP_BACKUP -exec rm {} \;

cd $LOG_HOME
 find . -mtime +$DAYS_TO_KEEP_BACKUP -exec rm {} \;
 exit
 EOF

Until Next time

Cheers