config.setRepository(repository.getName());
config.setWorkspace("ws1");
config.setBackupType(BackupManager.FULL_AND_INCREMENTAL);
config.setBackupDir(backDir);
BackupScheduler scheduler = backup.getScheduler();
scheduler.schedule(config, startTime, null, 10, 6);
// wait till backup will be started
waitTime(startTime);
BackupChain bch1 = backup.getCurrentBackups().iterator().next();
// BackupChain bch1 = backup.findBackup(config.getRepository(), config.getWorkspace());
addContent(ws1TestRoot, 1, 20, 15);
// wait till next backup will be started
Thread.sleep(11000);
BackupChain bch2 = backup.getCurrentBackups().iterator().next();
// BackupChain bch2 = backup.findBackup(config.getRepository(), config.getWorkspace());
addContent(ws1TestRoot, 21, 40, 15);
// Stop backup
Thread.sleep(10000); // for last started chain
scheduler.unschedule(config);
log.info("-----------------[ restore #1 ]-------------------------");
restoreAndCheck("ws1back.incr14", "jdbcjcr17", bch1.getLogFilePath(), backDir, 1, 20);
log.info("-----------------[ restore #2 ]-------------------------");