Skip to content

andreaskueffel/FileSyncLibNet

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

64 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FileSyncLibNet

A library to easily backup or sync 2 folders either once or in a given interval.

Warning: This lib is in an early development stage. Use at own risk.

Usage

Minimal

var easySyncJob = FileSyncJob.CreateJob(FileSyncJobOptionsBuilder.CreateBuilder()
    .WithSourcePath("/data/db")
    .WithDestinationPath("/mnt/usb")
    .Build()
);
easySyncJob.ExecuteNow();

Configurable Options

var dbSyncJob = FileSyncJob.CreateJob(FileSyncJobOptionsBuilder.CreateBuilder()
    .WithSourcePath("/data/db")
    .WithDestinationPath(@"\\BackupServer\backups\database")
    .WithSearchPattern("*.db")
    .SyncRecursive(true)
    .SyncDeleted(false)
    .WithFileSyncProvider(FileSyncProvider.SMBLib)
    .WithCredentials("user", "pass")
    .WithInterval(TimeSpan.FromHours(1))
    .WithLogger(log)
    .Build()
);
dbSyncJob.StartJob();

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published