mysqldump: mysqldump

View source: R/utils_DBIO.R

mysqldumpR Documentation

mysqldump

Description

mysqldump

Usage

mysqldump(
  db,
  tables,
  user,
  pwd,
  host = "127.0.0.1",
  filenam = "dbdump.sql",
  dir = getwd(),
  dryrun = FALSE,
  compress = TRUE,
  ...
)

Arguments

db

db

tables

tables are given as a "tableName1 tableName2".

user

user

pwd

pwd

host

default to '127.0.0.1'

filenam

filenam.

dir

saving location on disk.

dryrun

when TRUE return call only. default to FALSE.

compress

when TRUE archive the sql output. default to TRUE.

...

further arguments to mysqldump (e.g. –no-data –no-create-db)

Value

the file path to the sql file or system call when dryrun = TRUE

Examples

## Not run: 
fp = mysqldump('tests',  user = 'testuser', pwd = '', dir = tempdir(), filenam = "tempbk.sql" , dryrun = TRUE)
mysqldump('tests', 't1 t2', 'testuser', pwd = '', dir = tempdir(), filenam = "tempbk.sql" , dryrun = TRUE)
mysqldump('tests', 't1', 'testuser', pwd = '', dir = tempdir(), filenam = "tempbk.sql", compress = FALSE , dryrun = TRUE)

## End(Not run)



mpio-be/dup documentation built on April 15, 2024, 8:10 p.m.