Skip to content

Commit

Permalink
Allow Creating Backup Engine with custom path.
Browse files Browse the repository at this point in the history
  • Loading branch information
kingster committed Sep 6, 2022
1 parent 51b3929 commit e0ff33c
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions backup.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,15 @@ func CreateBackupEngine(db *DB) (be *BackupEngine, err error) {
return
}

// CreateBackupEngineWithPath opens a backup engine from DB and path
func CreateBackupEngineWithPath(db *DB, path string) (be *BackupEngine, err error) {
if be, err = OpenBackupEngine(db.opts, path); err == nil {
be.db = db
}
return
}


// CreateNewBackup takes a new backup from db.
func (b *BackupEngine) CreateNewBackup() (err error) {
var cErr *C.char
Expand Down

0 comments on commit e0ff33c

Please sign in to comment.