mirror of
https://github.com/meilisearch/MeiliSearch
synced 2024-12-27 07:00:05 +01:00
Merge #2738
2738: Add missing env vars for dumps and snapshots features r=irevoire a=gmourier # Pull Request ## What does this PR do? Fixes #2721 ## PR checklist Please check if your PR fulfills the following requirements: - [x] Does this PR fix an existing issue? - [x] Have you read the contributing guidelines? - [x] Have you made sure that the title is accurate and descriptive of the changes? Thank you so much for contributing to Meilisearch! Co-authored-by: Guillaume Mourier <guillaume@meilisearch.com>
This commit is contained in:
commit
2d34b239ab
@ -103,15 +103,23 @@ pub struct Opt {
|
||||
/// Defines the path of the snapshot file to import.
|
||||
/// This option will, by default, stop the process if a database already exist or if no snapshot exists at
|
||||
/// the given path. If this option is not specified no snapshot is imported.
|
||||
#[clap(long)]
|
||||
#[clap(long, env = "MEILI_IMPORT_SNAPSHOT")]
|
||||
pub import_snapshot: Option<PathBuf>,
|
||||
|
||||
/// The engine will ignore a missing snapshot and not return an error in such case.
|
||||
#[clap(long, requires = "import-snapshot")]
|
||||
#[clap(
|
||||
long,
|
||||
env = "MEILI_IGNORE_MISSING_SNAPSHOT",
|
||||
requires = "import-snapshot"
|
||||
)]
|
||||
pub ignore_missing_snapshot: bool,
|
||||
|
||||
/// The engine will skip snapshot importation and not return an error in such case.
|
||||
#[clap(long, requires = "import-snapshot")]
|
||||
#[clap(
|
||||
long,
|
||||
env = "MEILI_IGNORE_SNAPSHOT_IF_DB_EXISTS",
|
||||
requires = "import-snapshot"
|
||||
)]
|
||||
pub ignore_snapshot_if_db_exists: bool,
|
||||
|
||||
/// Defines the directory path where meilisearch will create snapshot each snapshot_time_gap.
|
||||
@ -127,15 +135,15 @@ pub struct Opt {
|
||||
pub snapshot_interval_sec: u64,
|
||||
|
||||
/// Import a dump from the specified path, must be a `.dump` file.
|
||||
#[clap(long, conflicts_with = "import-snapshot")]
|
||||
#[clap(long, env = "MEILI_IMPORT_DUMP", conflicts_with = "import-snapshot")]
|
||||
pub import_dump: Option<PathBuf>,
|
||||
|
||||
/// If the dump doesn't exists, load or create the database specified by `db-path` instead.
|
||||
#[clap(long, requires = "import-dump")]
|
||||
#[clap(long, env = "MEILI_IGNORE_MISSING_DUMP", requires = "import-dump")]
|
||||
pub ignore_missing_dump: bool,
|
||||
|
||||
/// Ignore the dump if a database already exists, and load that database instead.
|
||||
#[clap(long, requires = "import-dump")]
|
||||
#[clap(long, env = "MEILI_IGNORE_DUMP_IF_DB_EXISTS", requires = "import-dump")]
|
||||
pub ignore_dump_if_db_exists: bool,
|
||||
|
||||
/// Folder where dumps are created when the dump route is called.
|
||||
|
Loading…
x
Reference in New Issue
Block a user