[英]Backup a derby database with excluding a table
I need to backup a derby database (both data and schema) to be restored later using Java我需要备份一个 derby 数据库(数据和模式),以便稍后使用 Java 进行恢复
but I need exclude one of the tables that is very big in size, and it's not important in this case to be backed up但我需要排除其中一个非常大的表,在这种情况下备份并不重要
Is there is any way to export a table as a create statement and list of inset statements?有没有办法将表导出为 create 语句和 inset 语句列表?
I found the following ways to backup, but non of them work in my case:我找到了以下备份方法,但在我的情况下它们都不起作用:
SYSCS_UTIL.SYSCS_BACKUP_DATABASE
This one will include the table that I don't want in include in the backup这将包括我不想包含在备份中的表
If I can exclude that table, that will be good.如果我可以排除那张桌子,那就太好了。
SYSCS_UTIL.SYSCS_EXPORT_TABLE
Calling it for each table is fine, but I don't know how to backup/restore the table schema on that point to restore!为每个表调用它很好,但我不知道如何在该点备份/恢复表模式以恢复!
It generates a comma separated file with the data on that point of time.它会生成一个逗号分隔的文件,其中包含该时间点的数据。
The opposite of the SYSCS_EXPORT_TABLE
system procedure is the SYSCS_IMPORT_TABLE
procedure: http://db.apache.org/derby/docs/10.15/ref/rrefimportproc.html与
SYSCS_EXPORT_TABLE
系统过程相反的是SYSCS_IMPORT_TABLE
过程: http://db.apache.org/derby/docs/10.15/ref/rrefimportproc.ZFC535FDC70AD5276
To make a full backup and restore solution out of this, I'd suggest:要从中制作完整的备份和恢复解决方案,我建议:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.