https://github.com/drillbits/tirds
A command-line tool to backup and restore Google Cloud Datastore Entities via local
https://github.com/drillbits/tirds
Last synced: 5 months ago
JSON representation
A command-line tool to backup and restore Google Cloud Datastore Entities via local
- Host: GitHub
- URL: https://github.com/drillbits/tirds
- Owner: drillbits
- License: apache-2.0
- Created: 2017-03-22T02:20:38.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2017-04-03T14:58:30.000Z (about 9 years ago)
- Last Synced: 2025-08-26T12:56:41.169Z (10 months ago)
- Language: Python
- Size: 92.8 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.rst
- License: LICENSE
Awesome Lists containing this project
README
=====
tirds
=====
``tirds`` is a command-line tool to backup and restore Google Cloud Datastore Entities via local.
``tirds`` stands for `Totte IRete DaSu(DataStore) `_.
You can back up Google Cloud Datastore entities, and restore them. Backups are saved to Google Cloud Storage. For details, see `Backing Up and Restoring `_.
But if you move a backup to another bucket, you will not be able to restore it. Because the ``backup_info`` file that is metadata of the backup includes the bucket name.
``tirds`` downloads a backup contains ``backup_info`` and blob files from the specified bucket, and uploads it to another bucket after replacing the bucket name in the ``backup_info``.
Installation
============
To install, use ``pip``.
.. code-block:: bash
$ pip install tirds
Usage
=====
.. code-block:: bash
$ tirds -h
---------------
Download backup
---------------
Download a backup from Google Cloud Storage.
.. code-block:: bash
$ tirds download --out OUTDIR --key-file KEYFILE handle
You can get ``handle`` from datastore admin.
.. image:: https://raw.githubusercontent.com/drillbits/tirds/master/doc/datastore_admin.png
.. image:: https://raw.githubusercontent.com/drillbits/tirds/master/doc/datastore_admin_backup_info.png
``KEYFILE`` is a path to the private key file for Service Account.
-------------
Upload backup
-------------
Upload a backup to Google Cloud Storage after replacing the bucket name.
.. code-block:: bash
$ tirds upload --key-file KEYFILE srcdir bucket
``srcdir`` is a path to the backup.
``bucket`` is a bucket name that is the upload destination and to be replaced with original bucket name.