Skip to contents

Save a copy of your database in plain text format. This saves all SQL code to recreate the structure and data.

Usage

sbfx_backup_pg(
  db_dump_name = subfoldr2::sbf_get_db_name(),
  sub = subfoldr2::sbf_get_sub(),
  main = subfoldr2::sbf_get_main(),
  config_path = getOption("psql.config_path", NULL),
  config_value = getOption("psql.config_value", "default")
)

Arguments

db_dump_name

A string of the name for the database backup file.

sub

A string specifying the path to the sub folder (by default the current sub folder).

main

A string specifying the path to the main folder (by default the current main folder)

config_path

A string of a file path to the yaml configuration file. The default value grabs the file path from the psql.config_path option and uses NULL if no value supplied.

config_value

A string of the name of value. The default value grabs the value from the psql.config_value option and uses "default" if no value is supplied.

Value

TRUE (or errors).

Details

Wrapper on psql::psql_backup().

Examples

if (FALSE) { # \dontrun{
sbfx_backup_pg()
sbfx_backup_pg("database-22")
} # }