10-25-2007 10:15 AM
#!/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