Skip to content

Instantly share code, notes, and snippets.

@mhahl
Created October 22, 2014 23:02
Show Gist options
  • Save mhahl/a7c77bc3905cbb4f0ca7 to your computer and use it in GitHub Desktop.
Save mhahl/a7c77bc3905cbb4f0ca7 to your computer and use it in GitHub Desktop.
Create pdbackups
#!/bin/sh
# Usage: ./script.sh | sh
CWD=$(pwd)
BACKUPS="$CWD/backups"
LISTS="$CWD/lst"
echo "rm /tmp/msg__pdbackup.log"
echo "rm $BACKUPS/*.tar"
echo "/opt/PolicyDirector/bin/pdbackup -action backup -list /opt/PolicyDirector/etc/pdbackup.lst -path $BACKUPS"
for file in $LISTS/*.lst
do
echo "/opt/PolicyDirector/bin/pdbackup -action backup -list $file -path $BACKUPS -file $(basename $file | cut -d "." -f 1)"
done
echo "sleep 3"
echo "vi /tmp/msg__pdbackup.log"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment