tor backup script
This commit is contained in:
parent
2ede674263
commit
861df2e0bb
13
bin/backup-tor.sh
Normal file
13
bin/backup-tor.sh
Normal 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'
|
Loading…
Reference in New Issue
Block a user