Discussion:
[h2] How to restore a H2 database backup into a new H2 database
Madhu M P
2018-10-12 03:53:22 UTC
Permalink
Hi Folks,

Can anyone provide me the procedure to restore a H2 database backup into a
new H2 database.

Thanks,
Madhu
--
You received this message because you are subscribed to the Google Groups "H2 Database" group.
To unsubscribe from this group and stop receiving emails from it, send an email to h2-database+***@googlegroups.com.
To post to this group, send email to h2-***@googlegroups.com.
Visit this group at https://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.
Evgenij Ryazanov
2018-10-12 04:38:49 UTC
Permalink
Hello.

There are to kinds of backups.

1. BACKUP command creates a ZIP archive with a new database file in it.
Such archive can be unpacked into some directory, path to unpacked file can
be specified in database connection URL. You can also rename this file if
you need it.

2. SCRIPT command creates a SQL script. If you have such backup, create a
new database and execute RUNSCIPT FROM '/path/to/file.sql'; (additional
arguments are required if file is compressed or encrypted).
http://h2database.com/html/grammar.html#runscript
The other way is to use RunScript tool:
http://h2database.com/html/tutorial.html#upgrade_backup_restore
--
You received this message because you are subscribed to the Google Groups "H2 Database" group.
To unsubscribe from this group and stop receiving emails from it, send an email to h2-database+***@googlegroups.com.
To post to this group, send email to h2-***@googlegroups.com.
Visit this group at https://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.
Loading...