Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
ALERT: The support homepage carousel is not displaying. We are working toward a resolution.

How to Data Folder Backup for Linux on Replicate

No ratings
cancel
Showing results for 
Search instead for 
Did you mean: 
David_Fergen
Former Employee
Former Employee

How to Data Folder Backup for Linux on Replicate

Last Update:

Aug 28, 2020 5:53:30 AM

Updated By:

Sonja_Bauernfeind

Created date:

Aug 14, 2020 11:17:53 AM

The following shell script should be added to the crontab and scheduled as required.  It backs up folders that aren't 'license','bin','lib' or 'tmp' in the /opt/attunity/replicate path.  It backs up the tarballs into a folder called /home/tu_attunity/backups.  Make sure to change this value to suit your environment. 

cd /opt/attunity/replicate 

  

for i in $( ls --ignore='.*' | egrep -v 'license|bin|lib|tmp' ) 

do 

  CURRENT_TIME=$(date "+%Y.%m.%d-%H.%M.%S") 

  tar -zvcf /home/tu_attunity/backups/${i}-${CURRENT_TIME}.tar.gz ${i} >/tmp/att-backup.out 2>&1 

  if [ $? -eq 0 ] 

  then 

    cat /tmp/att-backup.out | /bin/mail -s "Att. Replicate Backup - ${i} - SUCCESS" -r CDC-Test@username.com   CDC-Test@username.com  

  else 

    cat /tmp/att-backup.out | /bin/mail -s "Att. Replicate Backup - ${i} - FAILED"  -r CDC-Test@username.com   CDC-Test@username.com  

  fi 

done 

  

To remove backed-up files that are older than 7 days:

  

find /home/tu_attunity/backups/ -mtime +7 -exec rm -f {} \; 

  

To remove tmp file: 

  

rm /tmp/att-backup.out 

 

Labels (1)
Version history
Last update:
‎2020-08-28 05:53 AM
Updated by: