0

它是工作代码,它是从数据库中转储表,但我要求从表中转储特定行,所以我应该在这个查询中写什么“mysqldump -u admin -p mydvc4408 dvs configuration_files -r”+filepath”

公共类备份{

final static String filepath = "/home/shubhampanchal/Downloads/backup/configuration_files.sql";

public static void main(String[] args) throws Exception {
    try {
        
        Runtime rt =Runtime.getRuntime();
        rt.exec("mysqldump -u admin -p mydvc4408 dvs configuration_files -r"+filepath);
        System.out.println("Backup created successfully!\nPath : "+filepath);
        
    } catch(Exception e) {
        e.printStackTrace();
    }
}

}

4

0 回答 0