2016-08-04 11:15:34 -05:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
export LOGFILE="/var/log/aether-gen.log"
|
|
|
|
|
2017-11-16 17:51:14 -06:00
|
|
|
export BACKUPDIR="/usr/local/backup"
|
|
|
|
export BACKUPCMD="rsync -avzl --delete-after";
|
2016-08-10 12:38:26 -05:00
|
|
|
|
2017-11-16 17:51:14 -06:00
|
|
|
date >> "$LOGFILE"
|
|
|
|
chown root:root "$BACKUPDIR"
|
|
|
|
chmod 0770 "$BACKUPDIR"
|
|
|
|
|
|
|
|
for i in `find /usr/local/etc/Aether/backup-entries/ -type f`; do
|
|
|
|
bash "${i}" &>> "$LOGFILE"
|
|
|
|
done
|
2016-08-04 11:15:34 -05:00
|
|
|
|
2017-11-16 17:51:14 -06:00
|
|
|
date > "$BACKUPDIR"/lastbackup.date
|
|
|
|
|
|
|
|
cd /home/aether
|
2016-08-04 11:15:34 -05:00
|
|
|
|
|
|
|
echo Creating and compressing archive...
|
2016-08-10 12:38:26 -05:00
|
|
|
tar cvf aether.tar /usr/local/backup
|
2016-08-04 11:15:34 -05:00
|
|
|
gzip -f aether.tar
|
|
|
|
|
|
|
|
echo Encrypting archive
|
|
|
|
openssl enc -aes256 -pass file:/usr/local/etc/Aether/pass.txt -in aether.tar.gz -out aether.enc
|
|
|
|
rm aether.tar.gz
|
|
|
|
|
|
|
|
echo Created aether archive.
|
|
|
|
|
2017-11-16 17:51:14 -06:00
|
|
|
date >> "$LOGFILE"
|
|
|
|
echo >> "$LOGFILE"
|