i have a backup that i managed to created
and it shows:
```
database: projects/project/databases/(default)
databaseUid: id
expireTime: '2023-11-15T19:30:58.935967Z'
name: projects/project/locations/nam5/backups/id
snapshotTime: '2023-11-13T19:30:58.898236Z'
state: READY
```
so how can i check now if the backup is ok? what is the size of the backup ?
where is saved in the bucket?
Update 5/1/2024:
Firestore's managed backup and restore service, does not use Google Cloud Storage (GCS) buckets in the same way that manual exports and imports do.
To clarify:
Managed Backups: Firestore managed backups automatically backs up your data at scheduled intervals. These backups are handled by Google internally and do not require user interaction with Google Cloud Storage. They're designed for ease of use and reliability, providing automatic and periodic snapshots of your data.
Manual Exports/Imports: This is the method where Firestore data is exported to or imported from Google Cloud Storage. This process involves using the gcloud
command-line tool or Firebase Console to trigger exports and imports. This is useful for ad hoc backups, data migrations, or when you need to have physical files in GCS that you can manipulate or move to another environment.
Checking Managed Backup Details: For managed backups, you can view the backup configurations and their statuses through the Google Cloud Console, particularly within the Firestore section under "Backups." Here, you can manage the settings, see the status of each backup, and restore from these backups as needed.
Restoring Data: For managed backups, restoration can also be initiated from the Google Cloud Console, where you can select from the available backups and restore them to the original or to a new Firestore instance.
To verify the integrity and size of your scheduled Firestore backup, follow these steps:
Check the Backup Status:
View Backup Details:
Access Backup Files in Cloud Storage:
Verify Backup Size:
Validate Backup Integrity:
Additional Considerations:
Hi, I don't see a "Backups" tab in the Firebase console.
Yes, I have looked everywhere too, there is no "Backups" tab...
@ms4446; So, I've setup Firebase Backup for a "(default)" database. By using "gcloud firestore backups schedules list", I can get the scheduled backups. And by using "gcloud firestore backups list", I can get each backup.
Each backup does list the snapshotTime, and the "state".
However, how do I:
1) Validate that the backup actually works (non-corrupted)
2) Download backup (to extract a specific document or similar, if possible, without restoring full backup to another DB-destination)
3) Check the size of each snapshot (backup)
4) Check the total amount of space used for snapshots (backups)
I cannot find those topics in the official docs: https://firebase.google.com/docs/firestore/backups.
Firebase’s managed backup service offers automated backups, but it does have some limitations.
First, while backups marked state: READY indicate successful completion, they do not offer explicit validation of data integrity at the document level. To ensure backups are functioning correctly, users should periodically restore backups to a staging environment. Though Firestore backups are reliable, users managing critical data may benefit from using manual exports for additional redundancy and validation.
Second, Firebase’s managed backups do not support partial access or direct download of specific documents. The data is stored in a proprietary format, and there is no way to extract individual documents without restoring the full backup. As a workaround, users can restore a backup to a temporary Firestore instance and then export specific documents using the Firestore export functionality.
Third, there is no direct way to check the size of individual backup snapshots. Firebase does not offer tools for snapshot size reporting. However, users can monitor overall backup storage usage via Google Cloud Billing reports, which provide insights into the total storage consumed by all backups. For more detailed size information, reaching out to Firebase support may be necessary.
Finally, while backups are stored using Google’s internal infrastructure, the total space consumed by backups is visible only through billing reports. This makes it difficult to manage backup storage at a granular level, unlike manual exports, which are stored in Google Cloud Storage and offer greater visibility.
Firebase managed backups are designed for full database restoration in the event of a disaster, not for fine-grained backup control. If users require more detailed access, partial downloads, or snapshot sizes, they should consider manual exports or third-party backup solutions. Submitting feature requests to Firebase for these functionalities may also help improve the service over time.
Thank you for the reply.
for now , backups seem to be available in the firebase console only on realtime databases, not firestore databases
Yes, currently Firestore doesn't offer the same convenient in-console backup management for backups as Firebase Realtime Database. Firestore backups are indeed managed and stored in GCS as I previously described.
While it might be a bit less streamlined than the experience for Realtime Database, the tools and methods outlined earlier still give you full control and visibility into your Firestore backups.