如何备份和恢复 apache ignite docker?

How to take backup and restore of apache ignite docker?

我正在为我的项目使用 apache ignite docker 作为持久存储。我需要在 'config' 文件夹下对 ignite 数据进行完整备份,例如 marshaller、db、binary 和 log。我正在使用 ignite:2.3.0.

下面是ignite的docker组合配置:

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>

能否请您建议我再次启动点燃容器时应该如何进行备份和恢复?

如果您需要对实时集群节点进行备份,请确保在进行备份之前停用集群,备份完成后重新激活。

您也可以使用 Apache Ignite snapshot feature introduced recently, or of more advanced GridGain snapshot features