def parse_backup_info_file(backup)
      raise(ArgumentError, "arg not of type Backup") if !backup.is_a? Backup
      raise(ArgumentError, "Backup.id not set") if backup.id.nil?
      raise(ArgumentError, "Backup.server not set") if backup.server.nil?
      backup_info = file_content("#{barman_home}/#{backup.server}/base/#{backup.id}/backup.info")
      backup_info.each do |l|
        key, value = l.split("=")
        case key
        when "status"
          backup.status = value.downcase.to_sym
        end

        unless value == 'None'
          case key
          when "begin_time"
            backup.backup_start = value
          when "end_time"
            backup.backup_end = value
          when "size"
            backup.size = value.to_i
          when "timeline"
            backup.timeline = value.to_i
          when "begin_wal"
            backup.begin_wal = WalFile.parse(value)
          when "end_wal"
            backup.end_wal = WalFile.parse(value)
          when "pgdata"
            backup.pgdata = value
          when "version"
            backup.pg_version = value.to_i
          when "error"
            backup.error = value
          end
        end
      end
    end
def parse_backup_info_file(backup)
      raise(ArgumentError, "arg not of type Backup") if !backup.is_a? Backup
      raise(ArgumentError, "Backup.id not set") if backup.id.nil?
      raise(ArgumentError, "Backup.server not set") if backup.server.nil?
      backup_info = file_content("#{barman_home}/#{backup.server}/base/#{backup.id}/backup.info")
      backup_info.each do |l|
        key, value = l.split("=")
        case key
        when "status"
          backup.status = value.downcase.to_sym
        end

        unless value == 'None'
          case key
          when "begin_time"
            backup.backup_start = value
          when "end_time"
            backup.backup_end = value
          when "size"
            backup.size = value.to_i
          when "timeline"
            backup.timeline = value.to_i
          when "begin_wal"
            backup.begin_wal = WalFile.parse(value)
          when "end_wal"
            backup.end_wal = WalFile.parse(value)
          when "pgdata"
            backup.pgdata = value
          when "version"
            backup.pg_version = value.to_i
          when "error"
            backup.error = value
          end
        end
      end
    end
Assigns various values to a {Backup} by parsing the according "backup.info"
 @param [Backup] backup the backup
 @return [void]
 @raise [ArgumentError] if backup is not of type {Backup}
 @raise [ArgumentError] if backup.id is not set
 @raise [ArgumentError] if backup.server is not set