Class Backup (3.10.0)

Interact with backups like get detailed information from BigTable, create a backup, or restore a backup to a table.

Package

@google-cloud/bigtable

Example


const {Bigtable} = require('@google-cloud/bigtable');
const bigtable = new Bigtable();
const instance = bigtable.instance('my-instance');
const cluster = instance.cluster('my-cluster');
const backup = cluster.backup('my-backup');

Constructors

(constructor)(cluster, id)

constructor(cluster: Cluster, id: string);

Constructs a new instance of the Backup class

Parameters
NameDescription
cluster Cluster
id string

The backup name or id.

Properties

bigtable

bigtable: Bigtable;

cluster

cluster: Cluster;

endDate

get endDate(): PreciseDate;

A Date-compatible PreciseDate representing the time that the backup was finished.

{PreciseDate}

expireDate

get expireDate(): PreciseDate;

A Date-compatible PreciseDate representing the expiration time of this backup.

{PreciseDate}

id

id: string;

A unique backup string, e.g. "my-backup".

metadata

metadata?: IBackup;

name

name: string;

The full path of the backup which is in the form of: projects/{project}/instances/{instance}/clusters/{cluster}/backups/{backup}.

startDate

get startDate(): PreciseDate;

A Date-compatible PreciseDate representing the time that this backup was started.

{PreciseDate}

Methods

create(config, callback)

create(config: CreateBackupConfig, callback?: CreateBackupCallback): void;
Parameters
NameDescription
config CreateBackupConfig
callback CreateBackupCallback
Returns
TypeDescription
void

create(config)

create(config: CreateBackupConfig): Promise<CreateBackupResponse>;
Parameter
NameDescription
config CreateBackupConfig
Returns
TypeDescription
Promise<CreateBackupResponse>

delete(gaxOptions)

delete(gaxOptions?: CallOptions): Promise<DeleteBackupResponse>;
Parameter
NameDescription
gaxOptions CallOptions
Returns
TypeDescription
Promise<DeleteBackupResponse>

delete(callback)

delete(callback: DeleteBackupCallback): void;
Parameter
NameDescription
callback DeleteBackupCallback
Returns
TypeDescription
void

delete(gaxOptions, callback)

delete(gaxOptions: CallOptions, callback: DeleteBackupCallback): void;
Parameters
NameDescription
gaxOptions CallOptions
callback DeleteBackupCallback
Returns
TypeDescription
void

exists(gaxOptions)

exists(gaxOptions?: CallOptions): Promise<BackupExistsResponse>;
Parameter
NameDescription
gaxOptions CallOptions
Returns
TypeDescription
Promise<BackupExistsResponse>

exists(gaxOptions, callback)

exists(gaxOptions: CallOptions, callback: BackupExistsCallback): void;
Parameters
NameDescription
gaxOptions CallOptions
callback BackupExistsCallback
Returns
TypeDescription
void

exists(callback)

exists(callback: BackupExistsCallback): void;
Parameter
NameDescription
callback BackupExistsCallback
Returns
TypeDescription
void

get(gaxOptions)

get(gaxOptions?: CallOptions): Promise<GetBackupResponse>;
Parameter
NameDescription
gaxOptions CallOptions
Returns
TypeDescription
Promise<GetBackupResponse>

get(callback)

get(callback: GetBackupCallback): void;
Parameter
NameDescription
callback GetBackupCallback
Returns
TypeDescription
void

get(gaxOptions, callback)

get(gaxOptions: CallOptions, callback: GetBackupCallback): void;
Parameters
NameDescription
gaxOptions CallOptions
callback GetBackupCallback
Returns
TypeDescription
void

getIamPolicy(options)

getIamPolicy(options?: GetIamPolicyOptions): Promise<GetIamPolicyResponse>;
Parameter
NameDescription
options GetIamPolicyOptions
Returns
TypeDescription
Promise<GetIamPolicyResponse>

getIamPolicy(options, callback)

getIamPolicy(options: GetIamPolicyOptions, callback: GetIamPolicyCallback): void;
Parameters
NameDescription
options GetIamPolicyOptions
callback GetIamPolicyCallback
Returns
TypeDescription
void

getMetadata(gaxOptions)

getMetadata(gaxOptions?: CallOptions): Promise<BackupGetMetadataResponse>;
Parameter
NameDescription
gaxOptions CallOptions
Returns
TypeDescription
Promise<BackupGetMetadataResponse>

getMetadata(callback)

getMetadata(callback: BackupGetMetadataCallback): void;
Parameter
NameDescription
callback BackupGetMetadataCallback
Returns
TypeDescription
void

getMetadata(gaxOptions, callback)

getMetadata(gaxOptions: CallOptions, callback: BackupGetMetadataCallback): void;
Parameters
NameDescription
gaxOptions CallOptions
callback BackupGetMetadataCallback
Returns
TypeDescription
void

restore(tableId, gaxOptions)

restore(tableId: string, gaxOptions?: CallOptions): Promise<RestoreTableResponse>;
Parameters
NameDescription
tableId string
gaxOptions CallOptions
Returns
TypeDescription
Promise<RestoreTableResponse>

restore(tableId, gaxOptions, callback)

restore(tableId: string, gaxOptions: CallOptions, callback: RestoreTableCallback): void;
Parameters
NameDescription
tableId string
gaxOptions CallOptions
callback RestoreTableCallback
Returns
TypeDescription
void

restore(tableId, callback)

restore(tableId: string, callback: RestoreTableCallback): void;
Parameters
NameDescription
tableId string
callback RestoreTableCallback
Returns
TypeDescription
void

restoreTo(config)

restoreTo(config: RestoreTableConfig): Promise<RestoreTableResponse>;
Parameter
NameDescription
config RestoreTableConfig
Returns
TypeDescription
Promise<RestoreTableResponse>

restoreTo(config, callback)

restoreTo(config: RestoreTableConfig, callback: RestoreTableCallback): void;
Parameters
NameDescription
config RestoreTableConfig
callback RestoreTableCallback
Returns
TypeDescription
void

setIamPolicy(policy, gaxOptions)

setIamPolicy(policy: Policy, gaxOptions?: CallOptions): Promise<SetIamPolicyResponse>;
Parameters
NameDescription
policy Policy
gaxOptions CallOptions
Returns
TypeDescription
Promise<SetIamPolicyResponse>

setIamPolicy(policy, gaxOptions, callback)

setIamPolicy(policy: Policy, gaxOptions: CallOptions, callback: SetIamPolicyCallback): void;
Parameters
NameDescription
policy Policy
gaxOptions CallOptions
callback SetIamPolicyCallback
Returns
TypeDescription
void

setIamPolicy(policy, callback)

setIamPolicy(policy: Policy, callback: SetIamPolicyCallback): void;
Parameters
NameDescription
policy Policy
callback SetIamPolicyCallback
Returns
TypeDescription
void

setMetadata(metadata, gaxOptions)

setMetadata(metadata: ModifiableBackupFields, gaxOptions?: CallOptions): Promise<BackupSetMetadataResponse>;
Parameters
NameDescription
metadata ModifiableBackupFields
gaxOptions CallOptions
Returns
TypeDescription
Promise<BackupSetMetadataResponse>

setMetadata(metadata, callback)

setMetadata(metadata: ModifiableBackupFields, callback: BackupSetMetadataCallback): void;
Parameters
NameDescription
metadata ModifiableBackupFields
callback BackupSetMetadataCallback
Returns
TypeDescription
void

setMetadata(metadata, gaxOptions, callback)

setMetadata(metadata: ModifiableBackupFields, gaxOptions: CallOptions, callback: BackupSetMetadataCallback): void;
Parameters
NameDescription
metadata ModifiableBackupFields
gaxOptions CallOptions
callback BackupSetMetadataCallback
Returns
TypeDescription
void

testIamPermissions(permissions, gaxOptions)

testIamPermissions(permissions: string | string[], gaxOptions?: CallOptions): Promise<TestIamPermissionsResponse>;
Parameters
NameDescription
permissions string | string[]
gaxOptions CallOptions
Returns
TypeDescription
Promise<TestIamPermissionsResponse>

testIamPermissions(permissions, callback)

testIamPermissions(permissions: string | string[], callback: TestIamPermissionsCallback): void;
Parameters
NameDescription
permissions string | string[]
callback TestIamPermissionsCallback
Returns
TypeDescription
void

testIamPermissions(permissions, gaxOptions, callback)

testIamPermissions(permissions: string | string[], gaxOptions: CallOptions, callback: TestIamPermissionsCallback): void;
Parameters
NameDescription
permissions string | string[]
gaxOptions CallOptions
callback TestIamPermissionsCallback
Returns
TypeDescription
void