zfs-backup-mm-example-config 986 B

1234567891011121314151617181920212223242526272829
  1. #Backup server settings
  2. backup_server="192.168.0.10"
  3. backup_server_port="22"
  4. backup_server_ipv=4
  5. backup_server_dataset="tank/backups"
  6. backup_server_delete_old_snaps=y
  7. backup_server_number_keep_snaps=31
  8. shape_megabytes=20
  9. #Source server settings
  10. #DO NOT CHANGE zfsnap_days_keep_snaps AFTER FIRST FULL BACKUP!
  11. zfsnap_enable=y
  12. zfsnap_days_keep_snaps=7
  13. running_containers=$(lxc list | grep RUNNING | awk {'print $2'})
  14. stopped_containers=$(lxc list | grep STOPPED | awk {'print $2'})
  15. excluded_strings="deluge\|testing"
  16. if [ -z "$stopped_containers" ]
  17. then
  18. source_datasets="$(zfs list | awk {'print $1'} | grep "crypt/lxd/storage/containers" | grep -ve "crypt/lxd/storage/containers$" | grep -e "$running_containers" | grep -ve "$excluded_strings")"
  19. else
  20. source_datasets="$(zfs list | awk {'print $1'} | grep "crypt/lxd/storage/containers" | grep -ve "crypt/lxd/storage/containers$" | grep -e "$running_containers" | grep -ve "$stopped_containers" | grep -ve "$excluded_strings")"
  21. fi