backup 601 B

1234567891011121314151617181920
  1. #!/bin/sh
  2. set -x
  3. # nginx: secrets; one-nginx
  4. # udev rules
  5. # sysctl scripts
  6. case "$1" in
  7. '')
  8. timestamp=$(date '+%Y-%m-%dT%H:%M')
  9. tar caf "/var/lib/backup/infra_$timestamp.tgz" /var/lib/syncthing/GPS/ /etc/nginx/ /usr/share/secrets/secrets.tar.age /home/git/git-shell-commands/ /home/git/me/ /home/git/pass.git/ /home/git/.ssh/ /home/git/.gitconfig config/ /var/lib/jellyfin/data/ /var/lib/jellyfin/plugins/ /var/lib/jellyfin/root/
  10. chgrp backup "/var/lib/backup/infra_$timestamp.tgz"
  11. chmod g+r "/var/lib/backup/infra_$timestamp.tgz"
  12. ;;
  13. 'clean')
  14. rm /var/lib/backup/infra_*.tgz
  15. ;;
  16. esac