簡體   English   中英

如何備份和恢復 apache 點燃 docker?

[英]How to take backup and restore of apache ignite docker?

我在我的項目中使用 apache ignite docker 作為持久存儲。 我需要對 'config' 文件夾下的 ignite 數據進行完整備份,例如 marshaller、db、binary 和 log。 我正在使用點燃: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>

當我再次啟動 ignite 容器時,您能否建議我應該如何進行備份和恢復?

如果您需要對活動集群節點進行備份,請確保在備份之前停用集群,在備份完成后重新激活。

您還可以使用最近推出的Apache Ignite 快照功能,或者更高級的 GridGain 快照功能

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM