Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

ERROR: (gcloud.alpha.firestore.backups.schedules.create) NOT_FOUND: Project ... Firestore

I want to create a daily schedule for a firestore database, daily.
I've already updated the CLI and started the project I'm going to use. And yes, it has an active firestore database, in use and with data. But I receive the following error message:

 

 

 

ERROR: (gcloud.alpha.firestore.backups.schedules.create) NOT_FOUND: Project 'central1' or database 'default' does not exist.

 

 

 


Has anyone been through this and could help me?

Solved Solved
1 2 1,280
1 ACCEPTED SOLUTION

The error message suggests that either the Firestore project central1 or its default database doesn't exist when you're trying to create a backup schedule.

Troubleshooting tips:

  • Make sure that you are using the correct project ID.
  • Make sure that you are using the correct database name.
  • Make sure that your Firestore database is enabled.
  • Make sure that you have the necessary permissions to create backups in Firestore. If you're not the project owner, you might need additional IAM roles like roles/datastore.importExportAdmin.
  • Make sure that you are running the latest version of the gcloud CLI.
  • Try creating the backup schedule from a different machine or network.
  • Try creating the backup schedule from the Google Cloud console (as of January 2022, this is not possible).

Backup schedule command:

To create a daily backup schedule for the default database in the central1 project, you can use the following command:

gcloud alpha firestore backups schedules create --project=central1 --database='(default)' --recurrence=daily

The alpha in gcloud alpha firestore indicates that this is an experimental feature and might not be stable. Be cautious when using alpha commands in production environments.

If you are still having trouble, please provide more information about your environment and the steps that you have taken so far.

View solution in original post

2 REPLIES 2

The error message suggests that either the Firestore project central1 or its default database doesn't exist when you're trying to create a backup schedule.

Troubleshooting tips:

  • Make sure that you are using the correct project ID.
  • Make sure that you are using the correct database name.
  • Make sure that your Firestore database is enabled.
  • Make sure that you have the necessary permissions to create backups in Firestore. If you're not the project owner, you might need additional IAM roles like roles/datastore.importExportAdmin.
  • Make sure that you are running the latest version of the gcloud CLI.
  • Try creating the backup schedule from a different machine or network.
  • Try creating the backup schedule from the Google Cloud console (as of January 2022, this is not possible).

Backup schedule command:

To create a daily backup schedule for the default database in the central1 project, you can use the following command:

gcloud alpha firestore backups schedules create --project=central1 --database='(default)' --recurrence=daily

The alpha in gcloud alpha firestore indicates that this is an experimental feature and might not be stable. Be cautious when using alpha commands in production environments.

If you are still having trouble, please provide more information about your environment and the steps that you have taken so far.

Tks @ms4446 
The solution as 

--database='(default)'

not 
 --database='default'