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
1
EmbeddedStorageManager storageManager = Configuration.Default()
2
.setBackupDirectory("A safe place")
3
.createEmbeddedStorageFoundation()
4
.createEmbeddedStorageManager();
Copied!
1
<properties>
2
<property name="backupDirectory" value ="/save/backup" />
3
...
4
</properties>
Copied!
1
backupDirectory = backupDir
Copied!
With MicroStream foundation classes:
Java
1
NioFileSystem fileSystem = NioFileSystem.New();
2
3
StorageBackupSetup backupSetup = StorageBackupSetup.New(
4
Storage.BackupFileProviderBuilder(fileSystem)
5
.setDirectory(fileSystem.ensureDirectoryPath(BACKUPDIR))
6
.setTruncationDirectory(fileSystem.ensureDirectoryPath(TRUNCATIONDIR))
7
.setDeletionDirectory(fileSystem.ensureDirectoryPath(DELETIONDIR))
8
.createFileProvider()
9
);
10
11
StorageConfiguration configuration = StorageConfiguration.Builder()
12
.setBackupSetup(backupSetup)
13
.setStorageFileProvider(StorageLiveFileProvider.New(
14
fileSystem.ensureDirectoryPath(WORKINGDIR)
15
))
16
.createConfiguration()
17
;
Copied!
Last modified 4mo ago
Export as PDF
Copy link