summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Kemp <steve@steve.org.uk>2015-04-02 09:23:41 +0100
committerSteve Kemp <steve@steve.org.uk>2015-04-02 09:23:41 +0100
commit0b200b42b5a387adbf00ab6bcfb36101fee9c5c2 (patch)
treec3283b9e1fccf4d39ff4792164ba16f1a823965b
parente254303eec822eb7f19ef7e37da0a0d4c5ff9182 (diff)
Removed commented out lines and updated headers.
-rwxr-xr-xbyteback-prune4
-rwxr-xr-xbyteback-receive9
-rwxr-xr-xbyteback-setup-client2
-rwxr-xr-xbyteback-setup-client-receive1
-rwxr-xr-xbyteback-snapshot2
5 files changed, 10 insertions, 8 deletions
diff --git a/byteback-prune b/byteback-prune
index 427ecd8..28ef2bf 100755
--- a/byteback-prune
+++ b/byteback-prune
@@ -1,6 +1,8 @@
#!/usr/bin/ruby
#
-# Program to prune a byteback installation
+# Program to free up space on the backup-storage volume, by removing
+# backups (whether by age, or importance).
+#
$LOAD_PATH.unshift("/usr/lib/byteback")
diff --git a/byteback-receive b/byteback-receive
index 54163d6..b5e71a5 100755
--- a/byteback-receive
+++ b/byteback-receive
@@ -2,8 +2,7 @@
#
# Program to receive backups and run rsync in receive mode. Must check that
# user as authorised by SSH is allowed to access particular directory.
-
-#STDERR.print ARGV.inspect + "\n"
+#
$LOAD_PATH.unshift("/usr/lib/byteback")
@@ -11,21 +10,19 @@ require 'trollop'
require 'byteback'
include Byteback::Log
-#debug "ARGV=#{ARGV.inspect}\nSSH_ORIGINAL_COMMAND=#{ENV['SSH_ORIGINAL_COMMAND']}\n"
if ENV['SSH_ORIGINAL_COMMAND']
ARGV.concat(ENV['SSH_ORIGINAL_COMMAND'].split(" "))
end
-#STDERR.print "after ARGV=#{ARGV.inspect}\n"
-
byteback_host = ENV['BYTEBACK_HOST']
fatal("BYTEBACK_HOST environment not set") unless byteback_host
byteback_root = ENV['HOME'] + "/" + ENV["BYTEBACK_HOST"]
fatal("#{byteback_root} does not exist") unless File.directory?(byteback_root)
-# force destination to be where we expect
+#
+# force the destination to be where we expect
#
if ARGV[0] == 'rsync'
ARGV[-1] = "#{byteback_root}/current"
diff --git a/byteback-setup-client b/byteback-setup-client
index 5e9389f..2c00e6a 100755
--- a/byteback-setup-client
+++ b/byteback-setup-client
@@ -1,6 +1,8 @@
#!/usr/bin/ruby
#
# Run on a client machine to set up backups for the first time
+#
+
$LOAD_PATH.unshift("/usr/lib/byteback")
diff --git a/byteback-setup-client-receive b/byteback-setup-client-receive
index e17c30b..5cf6dd0 100755
--- a/byteback-setup-client-receive
+++ b/byteback-setup-client-receive
@@ -1,6 +1,7 @@
#!/usr/bin/ruby
#
# Called by byteback-setup-client to set up a new byteback-setup-client
+#
$LOAD_PATH.unshift("/usr/lib/byteback")
diff --git a/byteback-snapshot b/byteback-snapshot
index 706701c..6249d3d 100755
--- a/byteback-snapshot
+++ b/byteback-snapshot
@@ -2,6 +2,7 @@
#
# Program to create a snapshot and/or rotate a directory of backup snapshots
# using btrfs subvolume commands.
+#
$LOAD_PATH.unshift("/usr/lib/byteback")
@@ -38,5 +39,4 @@ end
info "Making new snapshot"
@backups.new_snapshot!
-
info "Finished"