13 lines
334 B
Bash
13 lines
334 B
Bash
#!/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' |