Skip to content

Tankōbon / main/db/backup-service / applyPendingRestore

Function: applyPendingRestore() ​

applyPendingRestore(userDataDir, databaseDirectory, databaseFile): boolean

Defined in: main/db/backup-service.ts:142

Overwrites the database file with the copy a restoration was scheduled for. To run at start-up, before the database is opened. The pending request is always removed, so a copy that can't be restored doesn't block every following start; the file it would have replaced is kept as <file>.before-restore until the next one. Returns whether the database was replaced.

Parameters ​

userDataDir ​

string

databaseDirectory ​

string

databaseFile ​

string

Returns ​

boolean