zoukankan      html  css  js  c++  java
  • rsync 多模块

    多模块分为两种配置,不同点在于部分条件可以设置于全局,也可以设置在模块下,每个模块都需要进行授权,即更改目录属主属组

    •  每个模块单独配置
    1.  
      uid = rsync
    2.  
      gid = rsync
    3.  
      use chroot = no
    4.  
      max connections = 200
    5.  
      timeout = 300
    6.  
      pid file = /var/run/rsyncd.pid
    7.  
      lock file = /var/run/rsync.lock
    8.  
      log file = /var/log/rsyncd.log
    9.  
      [backup]
    10.  
      path = /backup
    11.  
      ignore errors
    12.  
      read only = false
    13.  
      list = false
    14.  
      hosts allow = 192.168.88.0/24
    15.  
      auth users = rsync_backup
    16.  
      secrets file = /etc/rsync.password
    17.  
      [rsync]
    18.  
      path = /rsync
    19.  
      ignore errors
    20.  
      read only = false
    21.  
      list = false
    22.  
      hosts allow = 192.168.88.0/24
    23.  
      auth users = rsync_backup
    24.  
      secrets file = /etc/rsync.password
    • 用全局配置,模块内只保留备份目录
    1.  
      uid = rsync
    2.  
      gid = rsync
    3.  
      use chroot = no
    4.  
      max connections = 200
    5.  
      timeout = 300
    6.  
      pid file = /var/run/rsyncd.pid
    7.  
      lock file = /var/run/rsync.lock
    8.  
      log file = /var/log/rsyncd.log
    9.  
      ignore errors
    10.  
      read only = false
    11.  
      list = false
    12.  
      hosts allow = 192.168.88.0/24
    13.  
      auth users = rsync_backup
    14.  
      secrets file = /etc/rsync.password
    15.  
      [backup]
    16.  
      path = /backup
    17.  
      [rsync]
    18.  
      path = /rsync

    在客户端执行命令

    [root@nfs01 ~]# rsync -avz file1 rsync_backup@192.168.88.41::rsync

    注意最后的rsync是配置的模块名

  • 相关阅读:
    Leetcode 811. Subdomain Visit Count
    Leetcode 70. Climbing Stairs
    Leetcode 509. Fibonacci Number
    Leetcode 771. Jewels and Stones
    Leetcode 217. Contains Duplicate
    MYSQL安装第三步报错
    .net 开发WEB程序
    JDK版本问题
    打开ECLIPSE 报failed to load the jni shared library
    ANSI_NULLS SQL语句
  • 原文地址:https://www.cnblogs.com/surplus/p/14238835.html
Copyright © 2011-2022 走看看