btrbk_backup/btrfs_bckp.sh

20 lines
448 B
Bash
Raw Normal View History

2023-05-08 23:05:11 +02:00
# EXAMPLE CRONJOB:
# 0 2 * * * /mnt/cloud/nc_dmcl/btrbk/btrfs_bckp.sh > /var/log/backup/btrfs_log.log
2023-05-08 23:07:09 +02:00
2023-05-08 23:05:11 +02:00
# stop services and snapshot
#Backup
2023-05-08 23:07:09 +02:00
# apt install btrbk
btrbk -c /my_btrbk_conf/btrbk.conf run
2023-05-08 23:05:11 +02:00
btrfs device stats /mnt/cloud/
btrfs device stats /mnt/backup/
btrfs device stats /mnt/db_ssd/
# send mail with logfile
docker run --rm -v /var/log/backup/:/attachment mcr.microsoft.com/powershell pwsh /external/sendEmail.ps1
# start services