AniNIX::Aether \\ Backup and Failsafe System
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

31 lines
674 B

#!/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"