• -F, --flush-logs


    <pre name="code" class="html">  -F, --flush-logs    Flush logs file in server before starting dump. Note that
                          if you dump many databases at once (using the option
                          --databases= or --all-databases), the logs will be
                          flushed for each database dumped. The exception is when
                          using --lock-all-tables or --master-data: in this case
                          the logs will be flushed only once, corresponding to the
                          moment all tables are locked. So if you want your dump
                          and the log flush to happen at the same exact moment you
                          should use --lock-all-tables or --master-data with
                          --flush-logs.
    					  
    					  
     刷新日志 在开始dump前, 如果一次备份多个数据库(使用选项  --databases= or --all-databases)
     
     logs 会在每个数据被备份后刷新磁盘、
     
     
     例外是当使用 --lock-all-tables or --master-data: 在这种情况下 logs只会刷新一次,相应的时刻所有的表被锁住
     
     因此如果有你需要备份和刷新日志在同时间发生 
     
     
     -rw-rw---- 1 mysql mysql 513M Apr  8 10:46 mysql-bin.000026
    -rw-rw---- 1 mysql mysql 513M Apr 14 09:06 mysql-bin.000027
    -rw-rw---- 1 mysql mysql 513M Apr 20 12:48 mysql-bin.000028
    -rw-rw---- 1 mysql mysql 513M Apr 26 13:16 mysql-bin.000029
    -rw-rw---- 1 mysql mysql 513M May  3 16:17 mysql-bin.000030
    -rw-rw---- 1 mysql mysql 513M May 10 10:28 mysql-bin.000031
    -rw-rw---- 1 mysql mysql 513M May 16 14:18 mysql-bin.000032
    -rw-rw---- 1 mysql mysql 513M May 21 00:23 mysql-bin.000033
    -rw-rw---- 1 mysql mysql 513M May 27 09:08 mysql-bin.000034
    -rw-rw---- 1 mysql mysql 513M Jun  2 10:50 mysql-bin.000035
    -rw-rw---- 1 mysql mysql 513M Jun  7 14:53 mysql-bin.000036
    -rw-rw---- 1 mysql mysql 513M Jun 14 14:31 mysql-bin.000037
    -rw-rw---- 1 mysql mysql 513M Jun 20 17:46 mysql-bin.000038
    -rw-rw---- 1 mysql mysql 513M Jun 27 10:11 mysql-bin.000039
    -rw-rw---- 1 mysql mysql 513M Jul  2 12:52 mysql-bin.000040
    -rw-rw---- 1 mysql mysql 513M Jul  7 17:23 mysql-bin.000041
    -rw-rw---- 1 mysql mysql 513M Jul 14 10:42 mysql-bin.000042
    -rw-rw---- 1 mysql mysql 1.8K Jul 14 10:42 mysql-bin.index
    -rw-rw---- 1 mysql mysql 143M Jul 15 18:53 mysql-bin.000043
    
    
    备份后:
    -rw-r--r-- 1 root  root  758M Apr  8 10:02 0408.txt
    -rw-rw---- 1 mysql mysql 513M Jul  7 17:23 mysql-bin.000041
    -rw-rw---- 1 mysql mysql 513M Jul 14 10:42 mysql-bin.000042
    -rw-rw---- 1 mysql mysql 143M Jul 15 18:54 mysql-bin.000043
    -rw-rw---- 1 mysql mysql  164 Jul 15 18:54 mysql-bin.index
    -rw-rw---- 1 mysql mysql  98K Jul 15 18:57 mysql-bin.000044
    
    备份前会刷新一个Binlog,之后的日志写到新的binlog
    


    
                                        
    
  • 相关阅读:
    字符串导出xml文件并弹出下载对话框
    Resource interpreted as Document but transferred with MIME type application/json
    org.w3c.dom document 和xml 字符串 互转
    Java xml出现错误 javax.xml.transform.TransformerException: java.lang.NullPointerException
    plsql developer中如何设置sql window显示行号
    Oracle表数据转换为XML格式数据
    Java用于取得当前日期相对应的月初,月末,季初,季末,年初,年末时间
    JS 中Json常用操作
    详解html中的marquee属性
    .net core 3.0中的Json API
  • 原文地址:https://www.cnblogs.com/hzcya1995/p/13350525.html
Copyright © 2020-2023  润新知