34 lines
791 B
Bash
34 lines
791 B
Bash
|
#!/bin/bash
|
||
|
|
||
|
export LOGFILE="/var/log/aether-gen.log"
|
||
|
|
||
|
cd /home/aether
|
||
|
|
||
|
date >> $LOGFILE
|
||
|
|
||
|
mkdir -p target
|
||
|
|
||
|
# Get a list of what's in Yggdrasil, in case we need to go hunting.
|
||
|
echo "Getting file list..."
|
||
|
find /srv/yggdrasil/ > target/Yggdrasil_file_list.txt
|
||
|
|
||
|
# Copy the nonrecoverable data to the target location.
|
||
|
rsync -azl --delete-after /usr/local/src/ target/src/
|
||
|
rsync -azl --delete-after /usr/local/etc/ target/etc/
|
||
|
rsync -azl --delete-after /usr/local/backup target/
|
||
|
|
||
|
date > target/last-updated
|
||
|
|
||
|
echo Creating and compressing archive...
|
||
|
tar cvf aether.tar target
|
||
|
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
|