Class: Google::Cloud::Spanner::Database::BackupInfo

Inherits:
Object
  • Object
show all
Defined in:
lib/google/cloud/spanner/database/backup_info.rb

Instance Method Summary collapse

Instance Method Details

#backup_idString

The unique identifier for the backup.

Returns:

  • (String)

44
45
46
# File 'lib/google/cloud/spanner/database/backup_info.rb', line 44

def backup_id
  @grpc.backup.split("/")[5]
end

#create_timeTime

The timestamp indicating the creation of the backup.

Returns:

  • (Time)

89
90
91
# File 'lib/google/cloud/spanner/database/backup_info.rb', line 89

def create_time
  Convert.timestamp_to_time @grpc.create_time
end

#instance_idString

The unique identifier for the instance.

Returns:

  • (String)

37
38
39
# File 'lib/google/cloud/spanner/database/backup_info.rb', line 37

def instance_id
  @grpc.backup.split("/")[3]
end

#pathString

The full path for the backup. Values are of the form projects/<project>/instances/<instance>/backups/<backup_id>.

Returns:

  • (String)

52
53
54
# File 'lib/google/cloud/spanner/database/backup_info.rb', line 52

def path
  @grpc.backup
end

#project_idString

The unique identifier for the project.

Returns:

  • (String)

30
31
32
# File 'lib/google/cloud/spanner/database/backup_info.rb', line 30

def project_id
  @grpc.backup.split("/")[1]
end

#source_database_idString

Name of the database the backup was created from.

Returns:

  • (String)

59
60
61
# File 'lib/google/cloud/spanner/database/backup_info.rb', line 59

def source_database_id
  @grpc.source_database.split("/")[5]
end

#source_database_instance_idString

The unique identifier for the source database instance.

Returns:

  • (String)

73
74
75
# File 'lib/google/cloud/spanner/database/backup_info.rb', line 73

def source_database_instance_id
  @grpc.backup.split("/")[3]
end

#source_database_pathString

The full path for the source database the backup was created from. Values are of the form projects/<project>/instances/<instance>/database/<database_id>.

Returns:

  • (String)

82
83
84
# File 'lib/google/cloud/spanner/database/backup_info.rb', line 82

def source_database_path
  @grpc.source_database
end

#source_database_project_idString

The unique identifier for the source database project.

Returns:

  • (String)

66
67
68
# File 'lib/google/cloud/spanner/database/backup_info.rb', line 66

def source_database_project_id
  @grpc.backup.split("/")[1]
end

#version_timeTime

The backup contains an externally consistent copy of source_database at the timestamp specified by the version_time received. If no version_time was given during the creation of the backup, the version_time will be the same as the create_time.

Returns:

  • (Time)

100
101
102
# File 'lib/google/cloud/spanner/database/backup_info.rb', line 100

def version_time
  Convert.timestamp_to_time @grpc.version_time
end