#!/bin/sh
# set chmod 700 to /backup for security reasons
cd /backup
FILENAME=`date +%d%b%Y`-htdir.tar.gz.sec
tar -cvf - /var/www/htdocs/ | gzip -c > htdir.tar.gz
openssl des -in htdir.tar.gz -out $FILENAME -pass pass:secpasswd
scp $FILENAME backup@backupsrv:/backup/srv1/htdir
echo `md5sum $FILENAME` >> md5sum.log
rm htdir.tar.gz $FILENAME
Nav komentāru:
Ierakstīt komentāru