AFP548

Using slapconfig -backupdb in a backup script

First item to note: I am competent with bash scripting, but not "good." If I was good I wouldn't be asking this question. :) So, I have a client who was only able to purchase one OD Xserve to use in a AD-OD integration project. Everything is running great (finally), but I would like to be able to pull nightly database backups since we don't have a replica scenario in place. So far I have the following: [code] ############################################ # VARIABLES ############################################ DATE=`date "+%Y-%m-%d"` BPATH="/Volumes/Data/Backup/ODBackup" FILENAME="$BPATH/$DATE-backup" PASSWORD="blargh" ############################################ # WORK ############################################ /usr/sbin/slapconfig -backupdb $FILENAME /usr/sbin/chmod 700 $FILENAME [/code] As you can see I am missing one major portion of the code which is where I pass the archive password variable. I know this sort of thing is possible in bash scripting, but I'm not entirely sure what it's called so I haven't had any luck looking it up. Additionally, I am aware of the security implications of having the archive password in a clear text document and will have permissions set accordingly. Thanks in advance. --Mike
Exit mobile version