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

Every snapshot is labelled as incomplete #568

Open theoware opened 1 year ago

theoware commented 1 year ago

Whenever btrbk runs it throws errors. I've had this issue for a while. I was able to reproduce them with btrbk pulled from master

sudo ./btrbk run
WARNING: Target subvolume "/btrfs_pool/_btrbk_snap/root.20231103T1617" exists, but is not a receive target of "/btrfs_pool/_btrbk_snap/root.20231103T1617"
WARNING: Please delete stray subvolumes: "btrbk clean /btrfs_pool/_btrbk_snap"
WARNING: Skipping backup of: /btrfs_pool/_btrbk_snap/root.20231103T1617
WARNING: Target subvolume "/btrfs_pool/_btrbk_snap/home.20231103T1617" exists, but is not a receive target of "/btrfs_pool/_btrbk_snap/home.20231103T1617"
WARNING: Please delete stray subvolumes: "btrbk clean /btrfs_pool/_btrbk_snap"
WARNING: Skipping backup of: /btrfs_pool/_btrbk_snap/home.20231103T1617
--------------------------------------------------------------------------------
Backup Summary (btrbk command line client, version 0.33.0-dev)

    Date:   Fri Nov  3 16:17:10 2023
    Config: /etc/btrbk/btrbk.conf

Legend:
    ===  up-to-date subvolume (source snapshot)
    +++  created subvolume (source snapshot)
    ---  deleted subvolume
    ***  received subvolume (non-incremental)
    >>>  received subvolume (incremental)
--------------------------------------------------------------------------------
/btrfs_pool/root
+++ /btrfs_pool/_btrbk_snap/root.20231103T1617
!!! /btrfs_pool/_btrbk_snap/root.20231103T1617
*** /mnt/drive/btrfs_pool/_btrbk_snap/root.20231103T1617

/btrfs_pool/home
+++ /btrfs_pool/_btrbk_snap/home.20231103T1617
!!! /btrfs_pool/_btrbk_snap/home.20231103T1617
*** /mnt/drive/btrfs_pool/_btrbk_snap/home.20231103T1617

NOTE: Some errors occurred, which may result in missing backups!
Please check warning and error messages above.
Please delete stray subvolumes: "btrbk clean /btrfs_pool/_btrbk_snap"
sudo ./btrbk clean -n
--------------------------------------------------------------------------------
Cleanup Summary (btrbk command line client, version 0.33.0-dev)

    Date:   Fri Nov  3 16:47:53 2023
    Config: /etc/btrbk/btrbk.conf
    Dryrun: YES

Legend:
    ---  deleted subvolume (incomplete backup)
--------------------------------------------------------------------------------
/btrfs_pool/_btrbk_snap/root.*
--- /btrfs_pool/_btrbk_snap/root.20231103T1617

/mnt/drive/btrfs_pool/_btrbk_snap/root.*
<no_action>

/btrfs_pool/_btrbk_snap/home.*
--- /btrfs_pool/_btrbk_snap/home.20231103T1617

/mnt/drive/btrfs_pool/_btrbk_snap/home.*
<no_action>

NOTE: Dryrun was active, none of the operations above were actually executed!

My config:

timestamp_format           long
transaction_log            /var/log/btrbk.log
snapshot_dir               _btrbk_snap
snapshot_create            always
incremental                yes
lockfile                   /var/lock/btrbk.lock
btrfs_commit_delete        yes

volume /btrfs_pool
  target /btrfs_pool/_btrbk_snap
  target /mnt/drive/btrfs_pool/_btrbk_snap

  subvolume root
  subvolume home