Archive instance wrapping the created incremental archive.Archive.createIncremental
Archive createIncremental(string fsRoot, string outDir, string base, string ext,
CreateOpts co, IncrOpts io) @safeCreates an incremental or differential backup archive.
This static factory creates a new archive containing only files that have changed since the reference archive was created. The reference archive is specified via IncrOpts.
Parameters
fsRoot | filesystem root to back up |
outDir | directory where slices are written |
base | archive base name for the new incremental archive |
ext | slice extension (e.g., "dar") |
co | create options (use createOpts() builder) |
io | incremental options specifying reference archive and policy |
Returns
A new
Throws
DarException if creation fails (I/O error, invalid reference,
permission denied, or other libdar-reported errors).
Example:
import ddn.wrp.dar;
// First create a full backup
auto co = createOpts().withAllowOverwrite(true).toLow();
auto fullBackup = Archive.create("/data", "/backups", "full", "dar", co);
// Later, create an incremental backup
auto io = incrOpts()
.withReference("/backups", "full", "dar")
.withMode(DarIncrMode.INCREMENTAL);
auto incrBackup = Archive.createIncremental("/data", "/backups", "incr1", "dar",
createOpts().withAllowOverwrite(true), io);Archive createIncremental(string fsRoot, string outDir, string base, string ext,
CreateOptions co, IncrementalOptions io) @safeCreates an incremental or differential backup using low-level options.
This overload accepts low-level CreateOptions and IncrementalOptions directly for cases where more control is needed.
Parameters
fsRoot | filesystem root to back up |
outDir | directory where slices are written |
base | archive base name for the new incremental archive |
ext | slice extension (e.g., "dar") |
co | low-level create options |
io | low-level incremental options |
Returns
A new
Archive instance wrapping the created incremental archive.Throws
DarException if creation fails.