-
Notifications
You must be signed in to change notification settings - Fork 929
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Add Firestore backup/schedule and restore support #6778
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #6778 +/- ##
==========================================
- Coverage 54.28% 54.22% -0.06%
==========================================
Files 350 352 +2
Lines 24362 24485 +123
Branches 5042 5063 +21
==========================================
+ Hits 13225 13278 +53
- Misses 9930 9996 +66
- Partials 1207 1211 +4 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some small style things and I'd love some more unit tests, but this LGTM overall.
513f0cc
to
109e513
Compare
109e513
to
33d5a60
Compare
Description
Creates new commands for Firestore disaster recovery support:
firestore:backups:schedules:list
firestore:backups:schedules:create
firestore:backups:schedules:update
firestore:backups:schedules:delete
firestore:backups:get
firestore:backups:list
firestore:backups:delete
firestore:databases:restore
Scenarios Tested
firestore:backups:schedules:list
firestore:backups:schedules:create
firestore:backups:schedules:update
firestore:backups:schedules:delete
firestore:backups:get
firestore:backups:list
firestore:backups:delete
firestore:databases:restore
Sample Commands
firebase firestore:backups:get projects/myproj/locations/nam5/backups/abcdefg
firebase firestore:backups:list –location=nam5 –project=myproj
firebase firestore:backups:delete projects/myproj/locations/nam5/backup/abcdefg
firebase firestore:backups:schedules:list --database '(default)'
firebase firestore:backups:schedules:create --database '(default)' --recurrence DAILY --retention 3d
firebase firestore:backups:schedules:create --database '(default)' --recurrence WEEKLY --day-of-week TUESDAY --retention 7d
firebase firestore:backups:schedules:update projects/myproj/databases/(default)/backupSchedules/hijklmnop --retention 4d
firebase firestore:backups:schedules:delete projects/myproj/databases/(default)/backupSchedules/hijklmnop
firebase firestore:databases:restore --database restore-target --backup projects/myproject/locations/nam5/backups/abcdefg