I am using apache ignite docker for my project as persistant storage. I need to take the whole backup of ignite data under the 'config' folder like marshaller, db, binary and log. I am using ignite:2.3.0.
Below is the docker compose configuration of ignite:
ignite:
hostname: ignite
image: apacheignite/ignite:2.3.0
environment:
- CONFIG_URI=file:///opt/ignite/apache-ignite-fabric-2.3.0-bin/work/ignite_config.xml
volumes:
- ./volumes/ignite/config:/opt/ignite/apache-ignite-fabric-2.3.0-bin/work
network_mode: "host"
ports:
- 0.0.0.0:${IGNITE_EXPOSED_PORT1}:${IGNITE_EXPOSED_PORT1}
- 0.0.0.0:${IGNITE_EXPOSED_PORT2}:${IGNITE_EXPOSED_PORT2}
- 0.0.0.0:${IGNITE_EXPOSED_PORT3}:${IGNITE_EXPOSED_PORT3}
ignite_config.xml
<bean id="ignite.cfg" class="org.apache.ignite.configuration.IgniteConfiguration">
<!-- Enabling Apache Ignite Persistent Store. -->
<property name="peerClassLoadingEnabled" value="true"/>
<property name="dataStorageConfiguration">
<bean class="org.apache.ignite.configuration.DataStorageConfiguration">
<property name="defaultDataRegionConfiguration">
<bean class="org.apache.ignite.configuration.DataRegionConfiguration">
<property name="persistenceEnabled" value="true"/>
<!-- Setting the size of the default region to 5GB. -->
<property name="maxSize" value="#{5L * 1024 * 1024 * 1024}"/>
</bean>
</property>
</bean>
</property>
<property name="discoverySpi">
<bean class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">
<property name="localPort" value="48500"/>
<property name="localPortRange" value="30"/>
<property name="ipFinder">
<bean class="org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder">
<property name="addresses">
<list>
<value>IP:48500..48530</value>
</list>
</property>
</bean>
</property>
</bean>
</property>
</bean>
Can you please suggest how should I take backup and restore when I bring the ignite container up again?
If you need to take a backup of live cluster node, make sure to deactivate cluster before taking a backup, reactivate after the backup is finished.
You can also make use of Apache Ignite snapshot feature introduced recently, or of more advanced GridGain snapshot features.