Glacier backup (cron script to backup any folder from linux)
Create the next script /root/doBackup.sh
:
#!/bin/bash
cd "$(dirname "$0")"
filename=bovs_tips_docker_$(date +"%d_%m_%Y").tar.gz
echo "Doing backup $filename" >> /tmp/backup.log
GZIP=-9 tar zcf $filename /var/lib/docker/volumes/stack_db-data/_data
export AWS_ACCESS_KEY_ID=xx
export AWS_SECRET_ACCESS_KEY=xx
java -jar glacieruploader-impl-0.1.1-jar-with-dependencies.jar --endpoint https://glacier.eu-central-1.amazonaws.com --vault backups --upload $filename
echo "Doing backup $filename done" >> /tmp/backup.log
Add backup script to cron:
crontab -e
0 5 * * 1 /root/doBackup.sh