Disclaimer:
In principle, since everything in your space should be serializable (if not, replication wouldn't work), you can simply write everything to a file. But this is a very bad idea, because you would have to serialize everything every time. A database handles the storage format for you, synchronization, it prevents corruption, it provides indexes...
Any non trivial persistence requirement will raise technical issues which would be too expensive to solve "in-house". Database are the right solution to use when persistence is required.
Good news: GigaSpaces provides you what you are looking for is Space Dump and Reload, based on the space copy API.
If you look at the end of the page, you see the following note:
Make sure the Space Dump utility has the
/gigaspaces-xap-root/lib/platform/jdbc/h2.jar as part of its
classpath.
In fact, it is backed by a database, H2SQLDB, which is probably populated through reflection