1 Reply Latest reply on Jul 18, 2008 3:16 PM by genman

    Storing a snapshot of TreeCache to disk?

    mschaffer

      I'm using TreeCache with the bdbje cacheloader. I'd like to get a dump of the TreeCache contents so I can then move them to another location for testing purposes.

      I could use bdb's DbBackup for this, but I'd need access to the Environment, which it looks like is private based on:

      http://anonsvn.jboss.org/repos/jbosscache/core/trunk/src/main/java/org/jboss/cache/loader/bdbje/BdbjeCacheLoader.java

      So I guess I'm going to have to ask TreeCache for the backup rather than hitting BDB directly. Anyone know how to pull this off?

      We're using jboss-cache 1.4.1.SP3

        • 1. Re: Storing a snapshot of TreeCache to disk?
          genman

          You should be able to instantiate the BdbjeCacheLoader instance and call methods to load the data. You may need to set up some dummy instances (e.g. TreeCache) since the loader goes to it for configuration information.

          To generate a backup, use "loadEntireState" and output the contents to disk. Restore using "storeEntireState".