restore_database: Restore database with pg_restore

Description Usage Arguments Value See Also Examples

View source: R/postgresql.R

Description

restore_database will restore the database saved from the backup_database function.

Usage

1
2
restore_database(dump_path, con = ".connection", create_new = TRUE,
  new_db_name = "newDB")

Arguments

dump_path

is the full path and file name for the dump file or SQL file

con

is the name of the database connection

create_new

if this is FALSE then it will create the database using the original DB name. So if the original was columbiaBike it will create a new columbiaBike. If TRUE then it will create a new database with the name specificied in new_db_name

new_db_name

if creating a new db then this is the name of the new db

Value

user.

See Also

Other postgresql functions: add_tables_db, agg_unit_ok, aggregate_data, already_uploaded, backup_database, column_exists, column_types, create_database, delete_data, get_column_names, get_connection, get_filenames_forSubject, get_filenames, get_row_count, get_sensor_data, get_subjectid, kill_pg_connections, list_tables, process_hexoskin, table_exists, upload_postgres, valid_connection

Examples

1
restore_database("/Users/xyz/backup.dump", con=".connection", create_new = TRUE, new_db_name = "columbiaBike_backup")

zevross-spatial/rpackage-sensorDataImport documentation built on Aug. 16, 2019, 4:53 p.m.