I'm looking at the new Backup and restore data functionality for Google Datastore (and Firestore), currently in Preview.
The Restore data from a database backup part instructs on how to restore a backup to a new database:
gcloud alpha firestore databases restore \
--source-backup=projects/PROJECT_ID/locations/LOCATION/backups/BACKUP_ID \
--destination-database='DATABASE_ID'
DATABASE_ID: A database ID for the new database. You cannot use a database ID that is already in use. The database mode will match that of the backup.
What is the point in this? I understand these are intended (also) for Disaster Recovery:
Use backups to protect your data from application-level data corruption or from accidental data deletion.
So in case my application suddenly gets his (default) database corrupted what am I supposed to do? Restore a backup in another database? Re-configure my application to use another database from (default) could take me more time.
Plus I cannot simply get rid of the corrupted (default) database deleting it because, I read:
For the
(default)database only, you must delete all related backups before you can delete the database.
Exporting and Importing Entities exports to a Google Cloud Storage bucket you can re-import to the same database right after. So does Point-in-time recovery, why scheduled backups do not?
I know I could restore to a different database, export to GCS and then import to (default), time is critical in a Disaster Recovery it would be simpler having a direct option, is it available somewhere?
This concern is already discussed here and They mentioned that
However, you can try one of the approaches they mentioned, if it matches your requirement.
If you are not satisfied with this. You can raise feature request for the same in public issue tracker by adding your concern.