cancel
Showing results for 
Search instead for 
Did you mean: 

Easy way to create ralus.cfg with excludes.

Frank_Larsen
Level 3
Hi there
 
After having some trouble manageing remote backup of Linux servers from MS Windows i developed a bash-script that creates a ralus.cfg which takes care of excludes etc.
 
Feel free to use the script below.
 
Code:
#!/bin/bashcd /etc/VRTSralusrm -f ralus.new# Customer specificcat ralus.cfg  | grep -v RALUS > ralus.new# Encodeecho "Software\VERITAS\Backup Exec\Engine\RALUS\Encoder=LATIN1" >> ralus.new# Find dirs and files that might be excludedfind / -type d -maxdepth 1 > tmpfile.txtfind / -type f -maxdepth 1 >> tmpfile.txtfind /home -type d -maxdepth 1 >> tmpfile.txtfind /home -type f -maxdepth 1 >> tmpfile.txtif test -d /home/backup; then  find /home/backup -type d -maxdepth 1 >> tmpfile.txt  find /home/backup -type f -maxdepth 1 >> tmpfile.txtficount=0while read LINE; do  case $LINE in    "/")                 continue;; # Do not exclude /    "/home")             continue;; # Do not exclude /home    "/home/backup")      continue;; # Do not exclude /home/backup    "/home/backup/oracledump") continue;; # Do not exclude /home/backup/oracledump    "/home/users")       continue;; # Do not exclude /home/users  esac  if test ${#count} = 1; then    ExcludeNum="00$count"  elif test ${#count} = 2; then    ExcludeNum="0$count"  else    ExcludeNum="$count"  fi  if test -d "$LINE"; then    LINE="$LINE/"  fi  echo "Software\VERITAS\Backup Exec\Engine\RALUS\SystemExclude$ExcludeNum=$LINE" >> ralus.new  let count=count+1done < tmpfile.txtrm tmpfile.txt

 
You have to check the ralus.new before copying it to ralus.cfg.
 
Regards
 
Frank Larsen
Nuuk, Greenland
0 REPLIES 0