digint / btrbk

Tool for creating snapshots and remote backups of btrfs subvolumes
https://digint.ch/btrbk/
GNU General Public License v3.0
1.71k stars 123 forks source link

Optional Backup Summary to the log #562

Open Massimo-B opened 1 year ago

Massimo-B commented 1 year ago

Hi, please provide an option to add the useful Backup Summary also to the logs.

The btrbk client prints the summary like this:

--------------------------------------------------------------------------------
Backup Summary (btrbk command line client, version 0.33.0-dev)

    Date:   Thu Sep 28 07:35:16 2023
    Config: /etc/btrbk/btrbk.conf
    Filter: all

Legend:
    ===  up-to-date subvolume (source snapshot)
    +++  created subvolume (source snapshot)
    ---  deleted subvolume
    ***  received subvolume (non-incremental)
    >>>  received subvolume (incremental)
--------------------------------------------------------------------------------
/mnt/btrfs-top-lvl/volumes/root
+++ /mnt/btrfs-top-lvl/snapshots/root/root.20230928T073516+0200
>>> /mnt/local/data/snapshots/root/root.20230928T073516+0200
>>> /mnt/usb/mobile/snapshots/desktop_one/root/root.20230928T073516+0200

/mnt/btrfs-top-lvl/volumes/home
+++ /mnt/btrfs-top-lvl/snapshots/home/home.20230928T073516+0200
>>> /mnt/local/data/snapshots/home/home.20230928T073516+0200
>>> /mnt/usb/mobile/snapshots/desktop_one/home/home.20230928T073516+0200
...
Saroumane commented 6 months ago

If you invoke btrbk as root, you could add >> /var/log/btrbk.log Example : /usr/bin/btrbk run >> /var/log/btrbk.log