tor backup script

This commit is contained in:
Matthias Kretschmann 2017-07-29 20:35:12 +02:00
parent 2ede674263
commit 861df2e0bb
Signed by: m
GPG Key ID: 606EEEF3C479A91F

13
bin/backup-tor.sh Normal file
View File

@ -0,0 +1,13 @@
#!/usr/bin/env bash
# needs to run as root
#
# setup as cron job:
#
# sudo crontab -e
# 0 2 * * * /bin/backup-tor.sh
# Create a time-stamped .tar file in the current directory.
# The .tar file will be readable only to root.
cd /home/root/backups/ || exit
sh -c 'umask 0077; tar -cf $(date "+%s-%F-var-lib-tor.tar") -C / var/lib/tor'