I've followed the gsutil install guide following the Google Cloud instructions and I've updated GCloud components to the latest versions. I've just recently installed and configured GCloud to work with my credentials and project. First, I've used the following command to export a single collection I need from my Firestore :
gcloud firestore export gs://my-project-id.appspot.com --collection-ids=theCollectionINeed
Now I see this export is in my Firebase Console Storage section as a folder. Being the project Owner, I'd like to get this export into my local system. For that, I see I need to use gsutil to be able to copy it. Reading the instructions to download the object from your bucket, I've tried with the following command, but I got this error:
$ gsutil cp -r gs://m-project-id.appspot.com/2020-05-22T02:01:06_86154 .
Copying gs://lucky-level-dev-6ac34.appspot.com/2020-05-22T02:01:06_86154/2020-05-22T02:01:06_86154.overall_export_metadata...
OSError: The filename, directory name, or volume label syntax is incorrect.
I'm running this command using cmd
in a Windows 10 environment.
I'd like to be able to download this folder from the cloud to my local drive.
Update
After being, I tried to change the bucket folder (object prefix) as suggested:
gsutil mv gs://my-project-id.appspot.com/2020-05-22T02:01:06_86154 gs://my-project-id.appspot.com/2020-06-23_someFolder
But trying again now throws me a new error:
gsutil cp -r gs://my-project-id.appspot.com/2020-05-22_someFolder .
Copying gs://my-project-id.appspot.com/2020-05-22_someFolder/2020-05-22T02:01:06_86154.overall_export_metadata...
OSError: Invalid argument.9.0 B]
Surely I need to change the name of the file too?
gsutil mv gs://m-project-id.appspot.com/2020-05-22T02:01:06_86154 gs://m-project-id.appspot.com/X
to rename the object and then trygsutil cp -r gs://m-project-id.appspot.com/X .
again. – AdebayoOSError: Invalid argument.9.0 B]
I'll update my question. Any ideas? – Yestergcloud storage
(github.com/GoogleCloudPlatform/gsutil/issues/1513) – Sissie