Files
Aether/aether-gen.bash
T

30 lines
703 B
Bash
Raw Normal View History

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
export BACKUPDIR="/usr/local/backup"
export BACKUPCMD="rsync -avzl --delete-after";
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}"
done
date > "$BACKUPDIR"/lastbackup.date
2016-08-04 11:15:34 -05:00
cd /home/aether
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.