[
https://issues.apache.org/jira/browse/IGNITE-15067?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17545827#comment-17545827
]
Pavel Pereslegin commented on IGNITE-15067:
-------------------------------------------
[~NSAmelchev], thanks for the review!
> Add custom destination path to the snapshost API
> ------------------------------------------------
>
> Key: IGNITE-15067
> URL: https://issues.apache.org/jira/browse/IGNITE-15067
> Project: Ignite
> Issue Type: Improvement
> Reporter: Maxim Muzafarov
> Assignee: Pavel Pereslegin
> Priority: Major
> Labels: iep-43, ise
> Fix For: 2.14
>
> Time Spent: 10m
> Remaining Estimate: 0h
>
> The default configuration path obtains from the IgniteConfiguration. However,
> in some circumstances, it is good to set this destination path at runtime.
> This path must be configured relatively in the node working directory and
> must be accessible from the security point of view.
> h3. Proposed API
> h4. Java (internal)
> {code:java}
> // New non-null getter in SnapshotHandlerContext to get the full path to the
> snapshot files.
> public File snapshotDirectory()
> // Snapshot creation example.
> snpMgr.createSnapshot("snpName", "/opt/snapshots")
> // Snapshot validation example.
> snpMgr.checkSnapshot("snpName", "/opt/snapshots")
> // Snapshot restore example.
> snpMgr.restoreSnapshot("snpName", "/opt/snapshots"){code}
> h4. Control script
> *create* command syntax
> {noformat}
> control.(sh|bat) --snapshot create snapshot_name [--dest path] [--sync]
> Parameters:
> snapshot_name - Snapshot name.
> --dest path - Path to the directory where the snapshot will be saved. If
> not specified, the default configured snapshot directory will be used.
> --sync - Run the operation synchronously, the command will wait for
> the entire operation to complete. Otherwise, it will be performed in the
> background, and the command will immediately return control.
> {noformat}
> *check* command syntax
> {noformat}
> control.(sh|bat) --snapshot check snapshot_name [--src path]
> Parameters:
> snapshot_name - Snapshot name.
> --src path - Path to the directory where the snapshot files are
> located. If not specified, the default configured snapshot directory will be
> used.
> {noformat}
> *restore* command syntax
> {noformat}
> control.(sh|bat) --snapshot restore snapshot_name --start [--groups
> group1,...groupN] [--src path] [--sync]
> Parameters:
> snapshot_name - Snapshot name.
> --groups group1,...groupN - Cache group names.
> --src path - Path to the directory where the snapshot files
> are located. If not specified, the default configured snapshot directory will
> be used.
> --sync - Run the operation synchronously, the command
> will wait for the entire operation to complete. Otherwise, it will be
> performed in the background, and the command will immediately return control.
> {noformat}
--
This message was sent by Atlassian Jira
(v8.20.7#820007)