Firebase Emulators 데이터 지속성
firebase-tools가 구성된 환경에서 다음 명령을 실행하여 에뮬레이터를 시작할 수 있습니다. 쉽네요 
$ npx firebase emulators:start
일반적으로 에뮬레이터를 사용하여 개발을 진행하지만 위의 명령으로 시작하면 중지하면 데이터가 모두 사라집니다. 무슨 일인지 생각해 조사한 결과, 이하의 이슈를 발견했습니다.
--import 와 --export-on-exit 옵션을 붙여서 기동하면, 에뮬레이터 정지시에 지정한 디렉토리에 데이터가 보존되어 다음에 기동시에 보존된 데이터가 사용되게 된다고.예를 들어
data라는 디렉토리에 저장하고 싶다면,$ npx firebase emulators:start --import data --export-on-exit
이렇게 실행하면 괜찮습니다.
그리고, 지금까지의 내용은, 실은 모두 공식 문서나 커멘드의 헬프에 실려 있습니다. 제대로 읽자.

$ npx firebase emulators:start --help
실행 결과
Usage: firebase emulators:start [options]
start the local Firebase emulators
Options:
  --only <emulators>          only specific emulators. This is a comma separated list of emulator names. Valid options are: ["auth","functions","firestore","database","hosting","pubsub","storage"]
  --inspect-functions [port]  emulate Cloud Functions in debug mode with the node inspector on the given port (9229 if not specified)
  --import [dir]              import emulator data from a previous export (see emulators:export)
  --export-on-exit [dir]      automatically export emulator data (emulators:export) when the emulators make a clean exit (SIGINT), when no dir is provided the location of --import [dir] is used
  -h, --help                  output usage information
디렉토리 지정에 관한 약간의 주의점
출력 대상으로 data 디렉토리를 지정하면 다음과 같은 디렉토리 구조로 출력됩니다.
data
├── firebase-export-metadata.json
├── firestore_export
│   ├── all_namespaces
│   └── firestore_export.overall_export_metadata
└── storage_export
    ├── blobs
    ├── buckets.json
    └── metadata
이 때, data 디렉토리는 마음대로 생성됩니다만, 로그를 보는 한 단순하게 mkdir $PWD/data 를 실행하고 있는 것 같습니다. 디렉토리의 계층을 늘리려고 data 디렉토리가없는 상태에서 data/firebase와 같은 지정을하면 디렉토리 생성에 실패하여 데이터가 출력되지 않으므로 주의가 필요합니다  
                
                    
        
    
    
    
    
    
                
                
                
                
                    
                        
                            
                            
                            Reference
                            
                            이 문제에 관하여(Firebase Emulators 데이터 지속성), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다
                                
                                https://qiita.com/mokichi/items/4b2fdfeda78fa3f28cdd
                            
                            
                            
                                텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
                            
                            
                                
                                
                                 우수한 개발자 콘텐츠 발견에 전념
                                (Collection and Share based on the CC Protocol.)
                                
                                
                                우수한 개발자 콘텐츠 발견에 전념
                                (Collection and Share based on the CC Protocol.)
                            
                            
                        
                    
                
                
                
            
data
├── firebase-export-metadata.json
├── firestore_export
│   ├── all_namespaces
│   └── firestore_export.overall_export_metadata
└── storage_export
    ├── blobs
    ├── buckets.json
    └── metadata
Reference
이 문제에 관하여(Firebase Emulators 데이터 지속성), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다 https://qiita.com/mokichi/items/4b2fdfeda78fa3f28cdd텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
                                
                                
                                
                                
                                
                                우수한 개발자 콘텐츠 발견에 전념
                                (Collection and Share based on the CC Protocol.)