zoukankan      html  css  js  c++  java
  • rsync 设置

    客户端(待备份):
    配置/etc/rsyncd.conf
    [root@linuxas3 root]# vi /etc/rsyncd.conf

    uid
    =root
    gid
    =root
    max connections
    =4
    use chroot=no
    log file
    =/var/log/rsyncd.log
    pid file
    =/var/run/rsyncd.pid
    lock file=/var/run/rsyncd.lock
    #auth users=root
    secrets file
    =/etc/rsyncd.pwd

    [postfix]
    path
    =/var/mail
    comment
    = backup mail
    ignore errors
    read only
    = yes
    list
    = no
    auth users
    = postfix

    [netkiller]
    path
    =/home/netkiller/web
    comment
    = backup 9812.net
    ignore errors
    read only
    = yes
    list
    = no
    auth users
    = netkiller

    [pgsqldb]
    path
    =/var/lib/pgsql
    comment
    = backup postgresql database
    ignore errors
    read only
    = yes
    list
    = no

    rsync
    --daemon

    echo  
    "rsync  --daemon"  >>  /etc/rc.d/rc.local
    服务端(备份区):
    rsync -avIR --delete--password-file=/etc/rsyncd.scrt name@ip::model 存放的文件


    编写存放在一个文件中,赋予其可执行权限,之后编辑/etc/crontab控制其执行时间
  • 相关阅读:
    图片懒加载
    浅谈javascript的函数节流
    js字符串常用方法详解
    js数组详解
    thinkphp3.2 批量添加数据
    openssl证书及配置
    手机访问PC端
    mui框架(三)
    mui框架(二)
    mui框架(一)
  • 原文地址:https://www.cnblogs.com/feiling/p/2558926.html
Copyright © 2011-2022 走看看