Module Evm_node_lib_dev.Snapshots_legacy

type compression =
  1. | No
    (*

    Produce uncompressed archive. Takes more space.

    *)
  2. | On_the_fly
    (*

    Compress archive on the fly. The rollup node will use less disk space to produce the snapshot but will lock the rollup node (if running) for a longer time.

    *)
  3. | After
    (*

    Compress archive after snapshot creation. Uses more disk space temporarily than On_the_fly but does not lock the rollup node for very long.

    *)

Compression strategy for snapshot archives.

module Header : sig ... end
val export : ?snapshot_file:string -> compression:compression -> data_dir:string -> unit -> string Tezos_base.TzPervasives.tzresult Lwt.t

export ?snapshot_file ~compression ~data_dir () creates a tar archive with name snapshot_file (or a generated name in the current directory) containing a snapshot of the EVM node with data directory data_dir. The path of the snapshot archive is returned.

For archive history mode, the original SQLite database files are included directly in the archive to avoid the expensive vacuum operation. For rolling and full modes, the database is exported using SQLite VACUUM INTO to produce a compacted copy.

val import_from : force:bool -> ?history_mode:Evm_node_config.Configuration.history_mode -> data_dir:string -> snapshot_file:string -> unit -> Evm_node_config.Configuration.history_mode option Tezos_base.TzPervasives.tzresult Lwt.t

import_from ~force ~data_dir ~snapshot_file imports the snapshot from file snapshot_file (but also takes care of downloading the file if snapshot_file is an url) at path snapshot_file into the data directory data_dir. Import will fail if data_dir is already populated unless force is set to true.

val info : snapshot_file:string -> (Header.t * [ `Compressed | `Uncompressed ]) Tezos_base.TzPervasives.tzresult Lwt.t

info ~snapshot_file returns information that can be used to inspect the snapshot file.