Skip to content

Commit

Permalink
Document backup
Browse files Browse the repository at this point in the history
  • Loading branch information
kriszyp committed Aug 31, 2023
1 parent 189f52b commit aafec80
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,9 @@ These methods remove all the entries from a database (asynchronously or synchron
### `db.drop(): Promise` and `db.dropSync()`
These methods remove all the entries from a database and delete that database (asynchronously or synchronously, respectively).

### `db.backup(path): Promise`
Safely makes a snapshot backup copy of the database at the specified target path.

### `resetReadTxn(): void`
Normally, this library will automatically start a reader transaction for get and range operations, periodically reseting the read transaction on new event turns and after any write transactions are committed, to ensure it is using an up-to-date snapshot of the database. However, you can call `resetReadTxn` if you need to manually force the read transaction to reset to the latest snapshot/version of the database. In particular, this may be useful running with multiple processes where you need to immediately reset the read transaction based on a known update in another process (rather than waiting for the next event turn).

Expand Down

0 comments on commit aafec80

Please sign in to comment.