Is it safe to writing data when a backup ongoing?

45 views
Skip to first unread message

Isaac Zeng

unread,
Aug 7, 2020, 5:55:20 AM8/7/20
to H2 Database
I have a scenario that needs to back up the h2 database(memory mode) regularly,
that makes snapshots to back up the state of real-time stream processing,
that in order to resume the system quickly from a snapshot. 

But, I don't want the backup interrupts my processing.

Evgenij Ryazanov

unread,
Aug 7, 2020, 6:20:42 AM8/7/20
to H2 Database
Hello.

BACKUP command of H2 works only with persistent databases. You can't use it with in-memory database.

You can try to use the SCRIPT command, it works with both persistent and in-memory databases, but it doesn't ensure consistency if some concurrent transaction commits its data.
Reply all
Reply to author
Forward
0 new messages