Continuous Backup

By default, the continuous backup is disabled. If enabled the EclipseStore instance will clone all changes to another directory. The backup is identical to the primary EclipseStore storage.

To enable the continuous backup just set the backup directory:

With storage-embedded-configuration API:

Java
EmbeddedStorageManager storageManager = EmbeddedStorageConfigurationBuilder.New()
	.setBackupDirectory("A safe place")
	.createEmbeddedStorageFoundation()
	.createEmbeddedStorageManager();
XML
<properties>
	<property name="backup-directory" value ="/save/backup" />
	...
</properties>
INI
backupDirectory = backupDir

With EclipseStore foundation classes:

Java
NioFileSystem      fileSystem  = NioFileSystem.New();

StorageBackupSetup backupSetup = StorageBackupSetup.New(
	Sorage.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()
;