2

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?

alamar
  • 18,729
  • 4
  • 64
  • 97
Suvendu Ghosh
  • 391
  • 1
  • 3
  • 16

1 Answers1

3

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.

alamar
  • 18,729
  • 4
  • 64
  • 97
  • Thanks getting the error 'Bean property 'snapshotPath' is not writable or has an invalid setter method. Does the parameter type of the setter match the return type of the getter' Is it because I am using ignite:2.3.0? Gridgrain plugin error Cannot find class [org.gridgain.grid.configuration.GridGainConfiguration] for bean with name 'org.gridgain.grid.configuration.GridGainConfiguration#56f4468b' defined in URL [file:/opt/ignite/apache-ignite-fabric-2.3.0-bin/work/ignite_config.xml]; nested exception is java.lang.ClassNotFoundException: org.gridgain.grid.configuration.GridGainConfiguration – Suvendu Ghosh Apr 05 '21 at 16:00
  • 1
    You need to download GridGain Ultimate Edition if you want GridGain snapshots. Apache Ignite 2.3 does not have any. – alamar Apr 06 '21 at 12:08