Forked from vexus2/import_and_export_firebase_auth.txt
Created
April 18, 2019 07:00
-
-
Save nabettu/9d21f179e581092f1c711553c98c0ffd to your computer and use it in GitHub Desktop.
2019-02-18_Firestoreリージョン移行に伴うFirebaseプロジェクト移行手順
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ firebase auth:export firebase-auth-users.json --format json --project 旧Firebaseプロジェクト | |
$ firebase auth:import firebase-auth-users.json --project 新Firebaseプロジェクト |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ gcloud beta firestore export gs://backup-us --project 旧Firebaseプロジェクト | |
$ gsutil ls -a gs://backup-us | tail -n1 # バックアップファイル確認 | |
$ gsutil cp -r `gsutil ls -a gs://backup-us | tail -n1` gs://backup-asia | |
$ gsutil ls -a gs://backup-asia | tail -n1 # バックアップファイル確認 | |
$ gcloud beta firestore import `gsutil ls -a gs://backup-asia | tail -n1` --project 新Firebaseプロジェクト | |
$ gcloud beta firestore operations list --project 新Firebaseプロジェクト # 末尾の実行中のJOB_IDを取得しdescribeに使う | |
$ gcloud beta firestore operations describe {JOB_ID} --project 新Firebaseプロジェクト |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment