Snapshot#

Note

You can back up your data by creating snapshots with create_snapshot() and create_snapshot().

featherstore.snapshot.restore_table(store_name, source, *, errors='raise')[source]#

Restores a table into the currently connected database.

The table is restored under the name stored in the snapshot. store_name selects only the destination store.

Parameters:
  • store_name (str) – The name of the store to restore the table into.

  • source (str) – Path to the snapshot file. .tar.xz is appended unless source already ends with that suffix.

  • errors (str, optional) – Whether to raise an error if a table with the same name already exists. Can be 'raise' or 'ignore'; 'ignore' overwrites the existing table. Default is 'raise'.

Returns:

The table name from the snapshot archive.

Return type:

str

Raises:
featherstore.snapshot.restore_store(source, *, errors='raise')[source]#

Restores a store into the currently connected database.

The store is restored under the name stored in the snapshot.

Parameters:
  • source (str) – Path to the snapshot file. .tar.xz is appended unless source already ends with that suffix.

  • errors (str, optional) – Whether to raise an error if a store with the same name already exists. Can be 'raise' or 'ignore'; 'ignore' overwrites the existing store. Default is 'raise'.

Returns:

The store name from the snapshot archive.

Return type:

str

Raises: