feat: Add Firestore backup/schedule and restore support #6778
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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