我们可以通过java编程备份我们当前的数据库吗?

时间:2021-10-09 05:38:56

Can we take backup of our current database through java programming ?

我们可以通过java编程备份我们当前的数据库吗?

1 个解决方案

#1


4  

You haven't specified what type of database so I'll presume something SQL-ish and accessible over JDBC. If this is the case, DBBackup should do what you want. That said, you might want to use the database-native tool (for MySQL, that's mysqldump; for PostgreSQL, pg_dump) as it'll probably be quicker, more reliable and so on.

你没有指定什么类型的数据库,所以我会假设一些SQL-ish并且可以通过JDBC访问。如果是这种情况,DBBackup应该做你想要的。也就是说,您可能希望使用数据库本机工具(对于MySQL,即mysqldump;对于PostgreSQL,pg_dump),因为它可能更快,更可靠等等。

#1


4  

You haven't specified what type of database so I'll presume something SQL-ish and accessible over JDBC. If this is the case, DBBackup should do what you want. That said, you might want to use the database-native tool (for MySQL, that's mysqldump; for PostgreSQL, pg_dump) as it'll probably be quicker, more reliable and so on.

你没有指定什么类型的数据库,所以我会假设一些SQL-ish并且可以通过JDBC访问。如果是这种情况,DBBackup应该做你想要的。也就是说,您可能希望使用数据库本机工具(对于MySQL,即mysqldump;对于PostgreSQL,pg_dump),因为它可能更快,更可靠等等。