| Server IP : 35.236.43.222 / Your IP : 216.73.216.143 Web Server : Apache System : Linux order-form-vm-001 5.10.0-37-cloud-amd64 #1 SMP Debian 5.10.247-1 (2025-12-11) x86_64 User : deploy ( 1002) PHP Version : 8.1.31 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /usr/lib/google-cloud-sdk/lib/surface/firestore/__pycache__/ |
Upload File : |
�
��d � � � d Z ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlm Z ddl
mZ dd lm
Z
dd
lmZ G d� dej � � Zd
S )z$The gcloud firestore export command.� )�absolute_import)�division)�unicode_literals)�importexport)�
operations)�storage_util)�base)�flags)�
propertiesc �6 � e Zd ZdZddiZed� � � Zd� ZdS )�Exportz9export Cloud Firestore documents to Google Cloud Storage.�EXAMPLESa� To export all collection groups to `mybucket` in objects prefixed with `my/path`, run:
$ {command} gs://mybucket/my/path
To export a specific set of collections groups asynchronously, run:
$ {command} gs://mybucket/my/path --collection-ids='specific collection group1','specific collection group2' --async
To export all collection groups from certain namespace, run:
$ {command} gs://mybucket/my/path --namespace-ids='specific namespace id'
To export from a snapshot at '2023-05-26T10:20:00.00Z', run:
$ {command} gs://mybucket/my/path --snapshot-time='2023-05-26T10:20:00.00Z'
c � � t j |� � t j |� � t j |� � t j |� � |� dd�� � t j � |� � dS )z Register flags for this command.�OUTPUT_URI_PREFIXa:
Location where the export files will be stored. Must be a valid
Google Cloud Storage bucket with an optional path prefix.
For example:
$ {command} gs://mybucket/my/path
Will place the export in the `mybucket` bucket in objects prefixed with
`my/path`.
)�helpN) r
�AddCollectionIdsFlag�AddNamespaceIdsFlag�AddSnapshotTimeFlag�AddDatabaseIdFlag�add_argumentr �
ASYNC_FLAG�AddToParser)�cls�parsers �lib/surface/firestore/export.py�ArgszExport.Args2 s� � �
��v�&�&�&� ��f�%�%�%� ��f�%�%�%� ��F�#�#�#�
����
� �
�
�
� �O����'�'�'�'�'� c � � t j j j � d�� � }t
j � |j d�� � }t j
||j |� � � �
d� � |j |j |j �� � }|j st% j |� � |S )NT)�required)�allow_empty_object�/)�
namespace_ids�collection_ids�
snapshot_time)r �VALUES�core�project�Getr �ObjectReference�FromUrlr r r
�database�ToUrl�rstripr"