mfdb_bulk | R Documentation |
Dump / Restore entire case studies.
mfdb_cs_dump(mdb, out_location) mfdb_cs_restore(mdb, in_location)
mdb |
(required) A database connection created by |
in_location, out_location |
(required) A filesystem directory or '.tar.gz' file to dump / restore database contents. |
Deprecated: These commands aren't strictly necessary any more. In most
situations it will be easier to use Postgres' pg_dump
and pg_restore
.
See mfdb-package for some examples of how to do it. These functions
don't offer much more functionality and much slower.
mfdb_cs_dump
copies all data from the database/case-study that mdb
is connected to, and writes it out to files in out_location
. If this
ends with 'tar.gz', then all files will be put into a tarball with the name
mfdb_cs_restore
will remove any case-study data, and replaces it with the
content of in_location
, a directory or tarball.
NULL
# Copy data from one database to another, note they don't have to be the same type mdb_out <- mfdb(tempfile(fileext = '.sqlite')) mdb_in <- mfdb(tempfile(fileext = '.duckdb')) dump_path <- tempfile(fileext='.tar.gz') mfdb_cs_dump(mdb_out, dump_path) mfdb_cs_restore(mdb_in, dump_path) mfdb_disconnect(mdb_in) mfdb_disconnect(mdb_out)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.