java操作数据库定时备份与还原 (2)

                print = new PrintStream(new File(backdir, currentTime + "_backup_err.log"));  

                dateFormat.applyPattern("yyyy-MM-dd HH:mm:ss");  

                currentTime = dateFormat.format(calendar.getTime());  

                print.println(currentTime + "  backup failed.");  

                e.printStackTrace(print);  

                print.flush();  

            } catch (IOException e2) {  

  

            } finally {  

                if (print != null) {  

                    print.close();  

                }  

            }  

        }  

  

    }  

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/zzsgwj.html