32 lines
674 B
Bash
Executable File
32 lines
674 B
Bash
Executable File
#!/bin/bash
|
|
|
|
export LOGFILE="/var/log/aether-gen.log"
|
|
|
|
export BACKUPDIR="/usr/local/backup"
|
|
export BACKUPCMD="rsync -avzl --delete-after";
|
|
|
|
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
|
|
|
|
date > "$BACKUPDIR"/lastbackup.date
|
|
|
|
cd /home/aether
|
|
|
|
echo Creating and compressing archive...
|
|
tar cvf aether.tar /usr/local/backup
|
|
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.
|
|
|
|
date >> "$LOGFILE"
|
|
echo >> "$LOGFILE"
|