summaryrefslogtreecommitdiff
path: root/bin/byteback-receive
diff options
context:
space:
mode:
authorPatrick J Cherry <patrick@bytemark.co.uk>2015-12-02 10:00:40 +0000
committerPatrick J Cherry <patrick@bytemark.co.uk>2015-12-02 10:00:40 +0000
commit95c2d95f42385aabdb961593dd9e6d1d5d494457 (patch)
tree1adbe163e27ee3dd0d281f01bbe10ef1af04ca70 /bin/byteback-receive
parentb186a1b6ff0ac7a9558eb3618f2c42a69599c145 (diff)
Changed the word "revision" to "snapshot" everywhere
This is for consistency and understanding. We use btrfs snapshots, so this makes sense. To me at least.
Diffstat (limited to 'bin/byteback-receive')
-rwxr-xr-xbin/byteback-receive15
1 files changed, 9 insertions, 6 deletions
diff --git a/bin/byteback-receive b/bin/byteback-receive
index f475446..87d3071 100755
--- a/bin/byteback-receive
+++ b/bin/byteback-receive
@@ -25,24 +25,27 @@ fatal("#{byteback_root} does not exist") unless File.directory?(byteback_root)
#
# Force restores to be limited to the hostname we're connecting form
#
+
+
+
if (ARGV[0] == 'byteback-restore')
args = ["rsync"]
- revision = nil
+ snapshot = nil
while((arg = ARGV.shift) != ".")
break if arg.nil?
verbose = arg if arg == "--verbose"
- if arg == "--revision"
- revision = ARGV.shift
+ if arg == "--snapshot"
+ snapshot = ARGV.shift
else
args << arg
end
end
restore = Byteback::Restore.new(byteback_root)
- restore.revision = revision if revision
+ restore.snapshot = snapshot if snapshot
restore.find(Byteback::Restore.decode_args(ARGV))
Dir.chdir(byteback_host)
@@ -73,7 +76,7 @@ opts = Trollop.options do
opt :ping, 'Check connection parameters and exit'
opt :list, 'Show backed up files matching the given pattern'
opt :list_all, 'Show all stored versions of a file'
- opt :revision, 'Show backed up files in a certain revision.', :default => '*'
+ opt :snapshot, 'Show backed up files in a certain snapshot.', :default => '*'
opt :restore, 'Perform a restoration operation', :type => :string
opt :complete, 'Mark current backup as complete'
end
@@ -85,7 +88,7 @@ elsif opts[:list]
args = Byteback::Restore.decode_args(ARGV[1..-1])
restore = Byteback::Restore.new(byteback_root)
- restore.revision = opts[:revision]
+ restore.snapshot = opts[:snapshot]
restore.find(args, :all => opts[:list_all], :verbose => opts[:verbose])
if restore.results.empty?