diff options
author | Matthew Bloch <matthew@bytemark.co.uk> | 2014-12-04 18:39:47 +0000 |
---|---|---|
committer | Matthew Bloch <matthew@bytemark.co.uk> | 2014-12-04 18:39:47 +0000 |
commit | 54849eb03280b7c859905b3ca190fce3b931e631 (patch) | |
tree | fb9b308b6fe9e7b1887f47bd70fe9b963f5af146 | |
parent | fcf00ad61a60c9e99a7d45380803f0dbf0b858f5 (diff) |
Replaced pathless btrfs invocation with /sbin/btrfs (as we're no longer root).
-rwxr-xr-x | byteback-prune | 2 | ||||
-rwxr-xr-x | byteback-setup-client-receive | 2 | ||||
-rw-r--r-- | lib/byteback/backup_directory.rb | 4 |
3 files changed, 4 insertions, 4 deletions
diff --git a/byteback-prune b/byteback-prune index 7d8d495..7e3e83e 100755 --- a/byteback-prune +++ b/byteback-prune @@ -127,4 +127,4 @@ if snapshots.empty? end info("Deleting #{snapshots.last.path}") -log_system("btrfs subvolume delete #{snapshots.last.path}") +log_system("/sbin/btrfs subvolume delete #{snapshots.last.path}") diff --git a/byteback-setup-client-receive b/byteback-setup-client-receive index 72e5471..0dc850f 100755 --- a/byteback-setup-client-receive +++ b/byteback-setup-client-receive @@ -30,7 +30,7 @@ Dir.chdir(ENV['HOME']) # don't know why we wouldn't be here FileUtils.mkdir_p(@hostname) error("Couldn't create btrfs subvolume") unless - system("btrfs subvolume create #{@hostname}/current") + system("/sbin/btrfs subvolume create #{@hostname}/current") FileUtils.mkdir_p(".ssh") diff --git a/lib/byteback/backup_directory.rb b/lib/byteback/backup_directory.rb index fc11840..6404cd8 100644 --- a/lib/byteback/backup_directory.rb +++ b/lib/byteback/backup_directory.rb @@ -53,11 +53,11 @@ module Byteback end def create!(from) - system_no_error("btrfs subvolume snapshot #{from} #{path}") + system_no_error("/sbin/btrfs subvolume snapshot #{from} #{path}") end def delete! - system_no_error("btrfs subvolume delete #{path}") + system_no_error("/sbin/btrfs subvolume delete #{path}") end # Returns the size of the given snapshot (runs du, may be slow) |