digint / btrbk

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

Feature request - "force" option to override existing snapshots or backups in destination #489

Open gpacgpac opened 2 years ago

gpacgpac commented 2 years ago

In case an existing subvolume with similar name exists in backup or snapshot destination, btrbk fails claiming for stray subvolume.

As reported in https://github.com/digint/btrbk/issues/282 there are some use cases where btrbk clean will not clean those existing subvolumes.

Proposal is to add a "force" option that could override the existing stray subvolume (by issuing a btrfs subvolume delete before creating it).

digint commented 2 years ago

something like this might come in the future, but it might get hard to know what to do exactly: do you just want to "btrfs delete" it? what if it's a regular directory? The fact that if "btrbk clean" cannot remove it, manual action is probably the recommended next steps anyways. btrbk should give some meaningful errors in such cases, recent versions of btrbk have some improvements there as well.