I am new in Hsqldb database. I want to know how to take backup and restore of hsqldb database through java code.Please suggest answer.
我是Hsqldb数据库的新手。我想知道如何通过java代码备份和恢复hsqldb数据库。请提出答案。
1 个解决方案
#1
1
If you want to perform the backup while database is being used, you use an SQL command like this:
如果要在使用数据库时执行备份,可以使用如下SQL命令:
BACKUP DATABASE TO ...
To restore the database, you use the main() method of the org.hsqldb.tar.DbBackup or org.hsqldb.tar.DbBackupMain (version 2.3.2 or later) depending on the version of HSQLDB.
要还原数据库,请使用org.hsqldb.tar.DbBackup或org.hsqldb.tar.DbBackupMain(版本2.3.2或更高版本)的main()方法,具体取决于HSQLDB的版本。
The commands are explained here:
这些命令在这里解释:
http://www.hsqldb.org/doc/2.0/guide/management-chapt.html#mtc_backup
http://www.hsqldb.org/doc/2.0/guide/management-chapt.html#mtc_backup
#1
1
If you want to perform the backup while database is being used, you use an SQL command like this:
如果要在使用数据库时执行备份,可以使用如下SQL命令:
BACKUP DATABASE TO ...
To restore the database, you use the main() method of the org.hsqldb.tar.DbBackup or org.hsqldb.tar.DbBackupMain (version 2.3.2 or later) depending on the version of HSQLDB.
要还原数据库,请使用org.hsqldb.tar.DbBackup或org.hsqldb.tar.DbBackupMain(版本2.3.2或更高版本)的main()方法,具体取决于HSQLDB的版本。
The commands are explained here:
这些命令在这里解释:
http://www.hsqldb.org/doc/2.0/guide/management-chapt.html#mtc_backup
http://www.hsqldb.org/doc/2.0/guide/management-chapt.html#mtc_backup