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.
 
 
 

17 lines
476 B

#!/bin/bash
### DO NOT EDIT THIS FILE ###
if [ ! -f /home/aether/.ssh/aether ]; then
echo "Need to have the aether key to run."
exit
fi
cd /home/aether
if [ $(ls ./aether-*.enc | wc -l) -gt 7 ]; then
rm $(ls -tr ./aether-*.enc | head -n 1);
fi
export TARGET="aether-"$(date +%F)".enc"
printf "get /aether/aether.enc %s\nbye\n" $TARGET | sftp -o IdentityFile=./.ssh/aether aether@aninix.net
echo "Aether copy populated. Today\'s was saved to "$TARGET
exit