2016-08-04 11:15:34 -05:00
|
|
|
#!/bin/bash
|
|
|
|
|
2023-07-15 22:34:00 -05:00
|
|
|
# File: aether-gen.bash
|
|
|
|
#
|
|
|
|
# Description: This file generates the backup in an encrypted format.
|
|
|
|
#
|
|
|
|
# Package: AniNIX/HelloWorld
|
|
|
|
# Copyright: WTFPL
|
|
|
|
#
|
|
|
|
# Author: DarkFeather <ircs://aninix.net:6697/DarkFeather>
|
2016-08-04 11:15:34 -05:00
|
|
|
|
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
|
|
|
chown root:root "$BACKUPDIR"
|
|
|
|
chmod 0770 "$BACKUPDIR"
|
|
|
|
|
|
|
|
for i in `find /usr/local/etc/Aether/backup-entries/ -type f`; do
|
2023-07-15 22:34:00 -05:00
|
|
|
bash "${i}"
|
2017-11-16 17:51:14 -06:00
|
|
|
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
|
|
|
|
2023-07-15 22:34:00 -05:00
|
|
|
echo Creating and encrypting archive...
|
|
|
|
tar cvzf - /usr/local/backup | openssl enc -aes256 -pass file:/usr/local/etc/Aether/pass.txt -in aether.tar.gz -out aether.enc
|
2016-08-04 11:15:34 -05:00
|
|
|
|
|
|
|
echo Created aether archive.
|