From 9603062b66da3af29c1ec6d764b7101e69c5dd2d Mon Sep 17 00:00:00 2001 From: ccottam Date: Tue, 3 Apr 2018 12:58:50 +0100 Subject: adding the --commit-after flag to the snapshot removal --- bin/byteback-prune | 2 +- lib/byteback/backup_directory.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/byteback-prune b/bin/byteback-prune index a0cd0fb..da0b72c 100755 --- a/bin/byteback-prune +++ b/bin/byteback-prune @@ -147,4 +147,4 @@ if snapshots.empty? end info("Deleting #{snapshots.last.path}") -log_system("#{btrfs_bin} subvolume delete #{snapshots.last.path}") +log_system("#{btrfs_bin} subvolume delete --commit-after #{snapshots.last.path}") diff --git a/lib/byteback/backup_directory.rb b/lib/byteback/backup_directory.rb index 01871d3..37b8112 100644 --- a/lib/byteback/backup_directory.rb +++ b/lib/byteback/backup_directory.rb @@ -120,7 +120,7 @@ module Byteback end def delete! - system_no_error("#{btrfs_bin} subvolume delete #{path}") + system_no_error("#{btrfs_bin} subvolume delete --commit-after #{path}") end # Returns the size of the given snapshot (runs du, may be slow) -- cgit v1.2.1