Reference documentation and code samples for the Cloud Firestore V1 Client class RestoreDatabaseRequest.
The request message for
FirestoreAdmin.RestoreDatabase.
Generated from protobuf message google.firestore.admin.v1.RestoreDatabaseRequest
Namespace
Google \ Cloud \ Firestore \ Admin \ V1
Methods
__construct
Constructor.
Parameters
Name
Description
data
array
Optional. Data for populating the Message object.
↳ parent
string
Required. The project to restore the database in. Format is projects/{project_id}.
↳ database_id
string
Required. The ID to use for the database, which will become the final component of the database's resource name. This database ID must not be associated with an existing database. This value should be 4-63 characters. Valid characters are /[a-z][0-9]-/ with first character a letter and the last a letter or a number. Must not be UUID-like /[0-9a-f]{8}(-[0-9a-f]{4}){3}-[0-9a-f]{12}/. "(default)" database ID is also valid.
↳ backup
string
Required. Backup to restore from. Must be from the same project as the parent. The restored database will be created in the same location as the source backup. Format is: projects/{project_id}/locations/{location}/backups/{backup}
Optional. Encryption configuration for the restored database. If this field is not specified, the restored database will use the same encryption configuration as the backup, namely use_source_encryption.
Optional. Immutable. Tags to be bound to the restored database. The tags should be provided in the format of tagKeys/{tag_key_id} -> tagValues/{tag_value_id}.
getParent
Required. The project to restore the database in. Format is
projects/{project_id}.
Returns
Type
Description
string
setParent
Required. The project to restore the database in. Format is
projects/{project_id}.
Parameter
Name
Description
var
string
Returns
Type
Description
$this
getDatabaseId
Required. The ID to use for the database, which will become the final
component of the database's resource name. This database ID must not be
associated with an existing database.
This value should be 4-63 characters. Valid characters are /[a-z][0-9]-/
with first character a letter and the last a letter or a number. Must not
be UUID-like /[0-9a-f]{8}(-[0-9a-f]{4}){3}-[0-9a-f]{12}/.
"(default)" database ID is also valid.
Returns
Type
Description
string
setDatabaseId
Required. The ID to use for the database, which will become the final
component of the database's resource name. This database ID must not be
associated with an existing database.
This value should be 4-63 characters. Valid characters are /[a-z][0-9]-/
with first character a letter and the last a letter or a number. Must not
be UUID-like /[0-9a-f]{8}(-[0-9a-f]{4}){3}-[0-9a-f]{12}/.
"(default)" database ID is also valid.
Parameter
Name
Description
var
string
Returns
Type
Description
$this
getBackup
Required. Backup to restore from. Must be from the same project as the
parent.
The restored database will be created in the same location as the source
backup.
Format is: projects/{project_id}/locations/{location}/backups/{backup}
Returns
Type
Description
string
setBackup
Required. Backup to restore from. Must be from the same project as the
parent.
The restored database will be created in the same location as the source
backup.
Format is: projects/{project_id}/locations/{location}/backups/{backup}
Parameter
Name
Description
var
string
Returns
Type
Description
$this
getEncryptionConfig
Optional. Encryption configuration for the restored database.
If this field is not specified, the restored database will use
the same encryption configuration as the backup, namely
use_source_encryption.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[],[],null,["# Cloud Firestore V1 Client - Class RestoreDatabaseRequest (1.53.0)\n\nVersion latestkeyboard_arrow_down\n\n- [1.53.0 (latest)](/php/docs/reference/cloud-firestore/latest/Admin.V1.RestoreDatabaseRequest)\n- [1.52.0](/php/docs/reference/cloud-firestore/1.52.0/Admin.V1.RestoreDatabaseRequest)\n- [1.51.0](/php/docs/reference/cloud-firestore/1.51.0/Admin.V1.RestoreDatabaseRequest)\n- [1.50.0](/php/docs/reference/cloud-firestore/1.50.0/Admin.V1.RestoreDatabaseRequest)\n- [1.48.1](/php/docs/reference/cloud-firestore/1.48.1/Admin.V1.RestoreDatabaseRequest)\n- [1.47.3](/php/docs/reference/cloud-firestore/1.47.3/Admin.V1.RestoreDatabaseRequest)\n- [1.46.0](/php/docs/reference/cloud-firestore/1.46.0/Admin.V1.RestoreDatabaseRequest)\n- [1.45.2](/php/docs/reference/cloud-firestore/1.45.2/Admin.V1.RestoreDatabaseRequest)\n- [1.44.1](/php/docs/reference/cloud-firestore/1.44.1/Admin.V1.RestoreDatabaseRequest)\n- [1.43.3](/php/docs/reference/cloud-firestore/1.43.3/Admin.V1.RestoreDatabaseRequest)\n- [1.40.0](/php/docs/reference/cloud-firestore/1.40.0/Admin.V1.RestoreDatabaseRequest)\n- [1.39.0](/php/docs/reference/cloud-firestore/1.39.0/Admin.V1.RestoreDatabaseRequest)\n- [1.38.0](/php/docs/reference/cloud-firestore/1.38.0/Admin.V1.RestoreDatabaseRequest)\n- [1.37.7](/php/docs/reference/cloud-firestore/1.37.7/Admin.V1.RestoreDatabaseRequest)\n- [1.36.1](/php/docs/reference/cloud-firestore/1.36.1/Admin.V1.RestoreDatabaseRequest)\n- [1.35.0](/php/docs/reference/cloud-firestore/1.35.0/Admin.V1.RestoreDatabaseRequest)\n- [1.34.0](/php/docs/reference/cloud-firestore/1.34.0/Admin.V1.RestoreDatabaseRequest)\n- [1.33.0](/php/docs/reference/cloud-firestore/1.33.0/Admin.V1.RestoreDatabaseRequest)\n- [1.32.0](/php/docs/reference/cloud-firestore/1.32.0/Admin.V1.RestoreDatabaseRequest)\n- [1.31.0](/php/docs/reference/cloud-firestore/1.31.0/Admin.V1.RestoreDatabaseRequest)\n- [1.30.0](/php/docs/reference/cloud-firestore/1.30.0/Admin.V1.RestoreDatabaseRequest)\n- [1.28.0](/php/docs/reference/cloud-firestore/1.28.0/Admin.V1.RestoreDatabaseRequest)\n- [1.27.3](/php/docs/reference/cloud-firestore/1.27.3/Admin.V1.RestoreDatabaseRequest) \nReference documentation and code samples for the Cloud Firestore V1 Client class RestoreDatabaseRequest.\n\nThe request message for\nFirestoreAdmin.RestoreDatabase.\n\nGenerated from protobuf message `google.firestore.admin.v1.RestoreDatabaseRequest`\n\nNamespace\n---------\n\nGoogle \\\\ Cloud \\\\ Firestore \\\\ Admin \\\\ V1\n\nMethods\n-------\n\n### __construct\n\nConstructor.\n\n### getParent\n\nRequired. The project to restore the database in. Format is\n`projects/{project_id}`.\n\n### setParent\n\nRequired. The project to restore the database in. Format is\n`projects/{project_id}`.\n\n### getDatabaseId\n\nRequired. The ID to use for the database, which will become the final\ncomponent of the database's resource name. This database ID must not be\nassociated with an existing database.\n\nThis value should be 4-63 characters. Valid characters are /\\[a-z\\]\\[0-9\\]-/\nwith first character a letter and the last a letter or a number. Must not\nbe UUID-like /\\[0-9a-f\\]{8}(-\\[0-9a-f\\]{4}){3}-\\[0-9a-f\\]{12}/.\n\"(default)\" database ID is also valid.\n\n### setDatabaseId\n\nRequired. The ID to use for the database, which will become the final\ncomponent of the database's resource name. This database ID must not be\nassociated with an existing database.\n\nThis value should be 4-63 characters. Valid characters are /\\[a-z\\]\\[0-9\\]-/\nwith first character a letter and the last a letter or a number. Must not\nbe UUID-like /\\[0-9a-f\\]{8}(-\\[0-9a-f\\]{4}){3}-\\[0-9a-f\\]{12}/.\n\"(default)\" database ID is also valid.\n\n### getBackup\n\nRequired. Backup to restore from. Must be from the same project as the\nparent.\n\nThe restored database will be created in the same location as the source\nbackup.\nFormat is: `projects/{project_id}/locations/{location}/backups/{backup}`\n\n### setBackup\n\nRequired. Backup to restore from. Must be from the same project as the\nparent.\n\nThe restored database will be created in the same location as the source\nbackup.\nFormat is: `projects/{project_id}/locations/{location}/backups/{backup}`\n\n### getEncryptionConfig\n\nOptional. Encryption configuration for the restored database.\n\nIf this field is not specified, the restored database will use\nthe same encryption configuration as the backup, namely\n[use_source_encryption](/php/docs/reference/cloud-firestore/latest/Admin.V1.Database.EncryptionConfig#_Google_Cloud_Firestore_Admin_V1_Database_EncryptionConfig__getUseSourceEncryption__).\n\n### hasEncryptionConfig\n\n### clearEncryptionConfig\n\n### setEncryptionConfig\n\nOptional. Encryption configuration for the restored database.\n\nIf this field is not specified, the restored database will use\nthe same encryption configuration as the backup, namely\n[use_source_encryption](/php/docs/reference/cloud-firestore/latest/Admin.V1.Database.EncryptionConfig#_Google_Cloud_Firestore_Admin_V1_Database_EncryptionConfig__getUseSourceEncryption__).\n\n### getTags\n\nOptional. Immutable. Tags to be bound to the restored database.\n\nThe tags should be provided in the format of\n`tagKeys/{tag_key_id} -\u003e tagValues/{tag_value_id}`.\n\n### setTags\n\nOptional. Immutable. Tags to be bound to the restored database.\n\nThe tags should be provided in the format of\n`tagKeys/{tag_key_id} -\u003e tagValues/{tag_value_id}`."]]