Links

Continuous Backup

This is the manual for older MicroStream versions (Version < 5.0).
The new documentation (Version >= 5.0) is located at:
By default, the continuous backup is disabled. If enabled the MicroStream instance will clone all changes to another directory. The backup is identical to the primary MicroStream storage.
To enable the continuous backup just set the backup directory:
With storage.embedded.configuration API:
Java
Xml
ini
EmbeddedStorageManager storageManager = Configuration.Default()
.setBackupDirectory("A safe place")
.createEmbeddedStorageFoundation()
.createEmbeddedStorageManager();
<properties>
<property name="backupDirectory" value ="/save/backup" />
...
</properties>
backupDirectory = backupDir
With MicroStream foundation classes:
Java
NioFileSystem fileSystem = NioFileSystem.New();
StorageBackupSetup backupSetup = StorageBackupSetup.New(
Storage.BackupFileProviderBuilder(fileSystem)
.setDirectory(fileSystem.ensureDirectoryPath(BACKUPDIR))
.setTruncationDirectory(fileSystem.ensureDirectoryPath(TRUNCATIONDIR))
.setDeletionDirectory(fileSystem.ensureDirectoryPath(DELETIONDIR))
.createFileProvider()
);
StorageConfiguration configuration = StorageConfiguration.Builder()
.setBackupSetup(backupSetup)
.setStorageFileProvider(StorageLiveFileProvider.New(
fileSystem.ensureDirectoryPath(WORKINGDIR)
))
.createConfiguration()
;
Last modified 2yr ago