def backups(server, opts = {})
      list = run_barman_command("list-backup #{server}")
      list = list.grep(/#{opts[:backup_id]}/) if !opts[:backup_id].nil?

      backups = Backups.new(parse_backup_list(list))
      backups.each do |backup|
        parse_backup_info_file(backup)
        if opts[:with_wal_files]
          wals = wal_files(backup.server, backup.id)
          # using exact wal file size from xlog.db. show-backup is too inaccurate
          backup.wal_files = wals
          backup.wal_file_size = 0
          wals.each { |w| backup.wal_file_size += w.size }
        end
      end
      return backups
    end
def backups(server, opts = {})
      list = run_barman_command("list-backup #{server}")
      list = list.grep(/#{opts[:backup_id]}/) if !opts[:backup_id].nil?

      backups = Backups.new(parse_backup_list(list))
      backups.each do |backup|
        parse_backup_info_file(backup)
        if opts[:with_wal_files]
          wals = wal_files(backup.server, backup.id)
          # using exact wal file size from xlog.db. show-backup is too inaccurate
          backup.wal_files = wals
          backup.wal_file_size = 0
          wals.each { |w| backup.wal_file_size += w.size }
        end
      end
      return backups
    end
Instructs barman to get information about backups
 @param [String] server server name
 @param [Hash] opts options for creating {Backups}
 @option opts [Boolean] :with_wal_files whether to include {WalFiles} in each {Backup}
 @option opts [String] :backup_id retrieve just one {Backup} specified by this backup id
 @return [Backups] an array of {Backup}