Snapshot Directory
Configuring Snapshot Directory
By default, a segment of the snapshot is stored in the work directory of a respective Ignite node. This segment uses the same storage media where Ignite Persistence keeps data, index, WAL, and other files. Since the snapshot can consume as much space as already taken by the persistence files and can affect your applications' performance by sharing the disk I/O with the Ignite Persistence routines, it’s suggested to store the snapshot and persistence files on different media.
You can avoid this interference between Ignite Native persistence and snapshotting by either changing storage directories of the persistence files or overriding the default snapshots' location as shown below:
<bean class="org.apache.ignite.configuration.IgniteConfiguration">
<!--
Sets a path to the root directory where snapshot files will be persisted.
By default, the `snapshots` directory is placed under the `IGNITE_HOME/db`.
-->
<property name="snapshotPath" value="/snapshots"/>
<property name="cacheConfiguration">
<bean class="org.apache.ignite.configuration.CacheConfiguration">
<property name="name" value="snapshot-cache"/>
</bean>
</property>
</bean>
IgniteConfiguration cfg = new IgniteConfiguration();
File exSnpDir = U.resolveWorkDirectory(U.defaultWorkDirectory(), "ex_snapshots", true);
cfg.setSnapshotPath(exSnpDir.getAbsolutePath());
© 2024 The Apache Software Foundation.
Apache, Apache Ignite, the Apache feather and the Apache Ignite logo are either registered trademarks or trademarks of The Apache Software Foundation.
Apache, Apache Ignite, the Apache feather and the Apache Ignite logo are either registered trademarks or trademarks of The Apache Software Foundation.