dataBackup: The firebase database backup function:

Description Usage Arguments Value Examples

View source: R/index.R

Description

The backup functionality allows to download the whole database into a .json file (which can later be uploaded in the firebase console to do a restore of the DB). Generally this function may allow to save costs by not relying on the Firebase automatic backup function that is only available with the Firebase Blaze premium payment contract.

Usage

1
dataBackup(projectURL, secretKey = "prompt", fileName)

Arguments

projectURL

The Firebase Project Url string

secretKey

The firebase secret key, which can be found in the Config/ Service Accounts/ Database secrets firebase page. string

fileName

The output file name. Can be any string with .json format string

Value

Returns either a warning or the backup file name.

Examples

1
2
3
4
## Not run: 
dataBackup(projectURL = "https://firedata-efa5a.firebaseio.com", secretKey = "2bYA6k72wKna90MqPGa6yuMG7jAysoDJZwJqYXsm", "test.json")

## End(Not run)

Kohze/fireData documentation built on Oct. 19, 2020, 8:19 a.m.