IMPORTcommands perform a logical backup and restore. A database export contains the database's data, and optionally some types of metadata, which can be subsequently imported in order to recreate the same database, in the original or in a different TigerGraph platform instance.
EXPORT GRAPHcommand reads the data and metadata for all graphs in the TigerGraph system and writes the information to a zip file in the designated folder. If no options are specified, then a full backup is performed, including schema, data, template information, and user profiles.
EXPORT GRAPHcommand exports all graphs in the database.
IMPORT GRAPHcommand unzips the
ExportedGraph.ziplocated in the designated folder, unzips it, and then runs the GSQL command files within.
DEFINE FILENAME F = "/path/to/file/", the path will be removed and the imported loading job will only contain
DEFINE FILENAME F. This is to allow a loading job to still be imported even though the file may no longer exist or the path may be different due to moving to another TigerGraph instance.
LOAD "/path/to/file" to vertex v1cannot be created if
/path/to/filedoes not exist.
$sys.data_rootwill be skipped. This is because the value of
$sys.data_rootis not retained from export. During import,
$sys.data_rootis set to the root folder of the import location.
LOAD "sys.data_root/.../<vertex_or_edge_type>.csv"Close to it should be similar line that is commented out which have the "all:" data source directive: