Class: RBarman::WalFiles

Inherits:
Array
  • Object
show all
Defined in:
lib/rbarman/wal_files.rb

Overview

An Array of WalFile

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(other = nil) ⇒ WalFiles

Initializes a new Array of RBarman::WalFile

Parameters:

  • other (Array, WalFiles) (defaults to: nil)

    appends all wal files from another array



9
10
11
# File 'lib/rbarman/wal_files.rb', line 9

def initialize(other=nil)
  self.concat(other) if !other.nil? and other.is_a? Array
end

Class Method Details

.by_id(server, backup_id) ⇒ WalFiles

Instructs the underlying (barman) command to get all wal files for a specific backup id

Parameters:

  • server (String)

    server name

  • backup_id (String)

    id of the backup

Returns:



17
18
19
20
# File 'lib/rbarman/wal_files.rb', line 17

def self.by_id(server, backup_id)
  cmd = CliCommand.new
  return WalFiles.new(cmd.wal_files(server, backup_id))
end