当前位置:首页 > 开发 > 操作系统 > 正文

搭建 CentOS 6 服务器(13) - rsync、Amanda

发表于: 2015-04-13   作者:rensanning   来源:转载   浏览:
摘要: (一)rsync Server端 # yum install rsync # vi /etc/xinetd.d/rsync service rsync { disable = no flags = IPv6 socket_type = stream wait
(一)rsync

Server端
# yum install rsync
# vi /etc/xinetd.d/rsync
    service rsync
    {
        disable = no
        flags           = IPv6
        socket_type     = stream
        wait            = no
        user            = root
        server          = /usr/bin/rsync
        server_args     = --daemon
        log_on_failure  += USERID
    }
# vi /etc/rsyncd.conf
    #--------------
    # Global options
    #--------------
    uid           = root
    gid           = root
    log file      = /var/log/rsyncd.log
    pid file      = /var/run/rsyncd.pid
    hosts allow   = 192.168.21.0/24
    hosts deny    = *
    dont compress = *.gz *.tgz *.zip *.pdf *.sit *.sitx *.lzh *.bz2 *.jpg *.gif *.png

    #--------------
    # Module options
    #--------------
    [tmp]
        comment      = rsync server
        path         = /tmp/rsync_folder
        use chroot    = true
        auth users   = rsync_user1, rsync_user2
        secrets file = /etc/rsyncd.secrets
        read only    = false
        exclude      = *.mp
        include      = *.mp30
# mkdir -p /tmp/rsync_folder
# vi /tmp/rsync_folder/a.txt
    test
# vi /etc/rsyncd.secrets
    rsync_user1:password
    rsync_user2:password
# chmod 600 /etc/rsyncd.secrets
# service xinetd restart


Client端
# yum install rsync 
# vi /etc/rsync.passwd 
    password
# chmod 600 /etc/rsync.passwd


确认
# /usr/bin/rsync -avz --delete --password-file=/etc/rsync.passwd rsync://rsync_user1@192.168.21.140/tmp /usr/local/rsynctest
    receiving incremental file list
    ./
    a.txt

    sent 82 bytes  received 156 bytes  476.00 bytes/sec
    total size is 5  speedup is 0.02
# ls -l /usr/local/rsynctest


定期同步
# crontab -e
    #每5分钟同步
    */5 * * * * /usr/bin/rsync -avz --delete --password-file=/etc/rsync.passwd rsync://rsync_user1@192.168.21.140/tmp /usr/local/rsynctest


(二)Amanda

安装
# yum list | grep "^amanda"
  2.6.1p2-9.el6_6 版本比较旧
# yum install amanda


安装3.3.7
# cd /usr/local/src
# wget http://www.zmanda.com/downloads/community/Amanda/3.3.7/Source/amanda-3.3.7-1.rhel6.src.rpm
# rpm -Uvh amanda-3.3.7-1.rhel6.src.rpm


Server端
# vi /etc/hosts
    # amanda server端设置
    192.168.21.91 amcnt
# vi /var/lib/amanda/.amandahosts
    # amanda server端设置
    amcnt root amindexd amidxtaped #restore用
    amcnt amandabackup amdump #backup用
# mkdir -R /etc/amanda/demo
# cd /etc/amanda/demo
# cp /var/lib/amanda/example/amanda.conf .
# vi disklist
    amsrv /usr/data comp-user-tar
# vi /etc/xinetd.d/amanda
   disable = no
# /etc/init.d/xinetd restart


Client端
# vi /etc/hosts
    # amanda client端设置
    192.168.21.90 amsrv
# vi /var/lib/amanda/.amandahosts
   # amanda client端设置
   amsrv amandabackup amdump
# mkdir -R /etc/amanda/demo
# cd /etc/amanda/demo
# vi amanda-client.conf
    conf "demo"          # server端设置的名称
    index_server "amsrv"
    tape_server "amsrv"
    tapedev "file:/var/lib/amanda/vtl"
    auth "bsdtcp"
    ssh_keys ""  
    unreserved-tcp-port 1025,65535
# vi /etc/xinetd.d/amanda
    disable = no
# /etc/init.d/xinetd restart


定期同步
# crontab -e
    45 0 * * 2-6 /usr/sbin/amdump demo

搭建 CentOS 6 服务器(13) - rsync、Amanda

  • 0

    开心

    开心

  • 0

    板砖

    板砖

  • 0

    感动

    感动

  • 0

    有用

    有用

  • 0

    疑问

    疑问

  • 0

    难过

    难过

  • 0

    无聊

    无聊

  • 0

    震惊

    震惊

编辑推荐
(一)MySQL (1)安装 # yum -y install http://dev.mysql.com/get/mysql-community-release-el6-5.no
(一)MySQL (1)安装 # yum -y install http://dev.mysql.com/get/mysql-community-release-el6-5.no
以下是在VirtualBox里的安装过程: 1. 选择“Select Install or upgrade existing system” 2. 选择
以下是在VirtualBox里的安装过程: 1. 选择“Select Install or upgrade existing system” 2. 选择
(1)安装Rails 1)安装需要的Package # yum -y install gcc # yum -y install gcc-c++ # yum -y ins
(1)安装Rails 1)安装需要的Package # yum -y install gcc # yum -y install gcc-c++ # yum -y ins
一、rsync 简介   Rsync(remote synchronize)是一个远程数据同步工具,可通过LAN/WAN快速同步多
参考文件 http://linux.chinaunix.net/techdoc/net/2008/01/21/977133.shtml http://www.2cto.com/o
一、rsync 简介   Rsync(remote synchronize)是一个远程数据同步工具,可通过LAN/WAN快速同步多
CentOS 6.3下rsync服务器的安装与配置 一、rsync 简介   Rsync(remote synchronize)是一个远程
版权所有 IT知识库 CopyRight © 2009-2015 IT知识库 IT610.com , All Rights Reserved. 京ICP备09083238号