Created
October 22, 2014 23:02
-
-
Save mhahl/a7c77bc3905cbb4f0ca7 to your computer and use it in GitHub Desktop.
Create pdbackups
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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