Creating Apache Ignite Cluster Backups
Before you go into production with GridGain, you need to decide on a cluster backup and recovery strategy. The disk media that persists your Ignite records will not serve forever. A new version of an application might have a bug that corrupts the data. The data center that is running your Ignite-based solution might fail and become unreachable. These examples are just a few of the many problems that can lead to data corruption or make your primary cluster unavailable. You can’t eliminate all such events. However, If you back up Ignite regularly, you can use your backups to restore a cluster that has experienced a data-loss incident.
In this part of the tutorial, you use the Snapshot Management screen, window="_blank" to create a cluster backup and use the backup later to resolve a data-corruption incident
Pause the Application
GridGain enables you to create hot cluster snapshots as applications update the cluster records and, later, to use the snapshots and WALs to recover to any point in time, window="_blank". However, in this tutorial, you simulate a data-loss incident by deleting all of a table’s records. Then, you observe that, after the cluster is restored, the number of records in the corrupted table is back to normal. Thus, now, stop the application that is used in the tutorial.
docker-compose -f docker/ignite-streaming-app.yaml stop
Create a Cluster Snapshot
After you pause the application, you navigate to the Snapshot Management screen, window="_blank" and create a cluster snapshot:
Corrupt a Cluster Table
After you create a cluster snapshot, you open the SQL screen, window="_blank"
and simulate a data-loss incident by removing records from the Trade
table:
-
Discover the number of trades in your cluster by executing the
SELECT count(*) FROM Trade query
. Your records count might not be the same as the number in the following screenshot, because the application might have been running for different amounts of time in your and my environments. -
Use the
DELETE FROM Trade
query to remove all the trades. -
Confirm that the table is empty by running the
SELECT count(*) FROM Trade
query again.
Restore from the Snapshot
Now, you use the snapshot that you created to restore the Trade
table:
What’s Next
Congratulations! You’ve finished all the steps of the tutorial. Now, you can stop the demo:
© 2024 GridGain Systems, Inc. All Rights Reserved. Privacy Policy | Legal Notices. GridGain® is a registered trademark of GridGain Systems, Inc.
Apache, Apache Ignite, the Apache feather and the Apache Ignite logo are either registered trademarks or trademarks of The Apache Software Foundation.