美文网首页
架构基础-第一节

架构基础-第一节

作者: linux_龍 | 来源:发表于2019-06-26 22:03 被阅读0次

    1.scp全量备份

    [root@backup ~]# scp /etc/hosts @172.16.1.31:/tmp
    The authenticity of host '172.16.1.31 (172.16.1.31)' can't be established.
    ECDSA key fingerprint is SHA256:Btpe0aClmIFPkhkbOMJKk2SQRh+6YgJxzawLWDtz/GU.
    ECDSA key fingerprint is MD5:27:01:76:c5:87:fe:04:48:b2:ca:85:95:97:55:04:a6.
    Are you sure you want to continue connecting (yes/no)? yes
    Warning: Permanently added '172.16.1.31' (ECDSA) to the list of known hosts.
    root@172.16.1.31's password: 
    hosts                                                                   100%  349   177.9KB/s   00:00  
    
    [root@nfs /tmp]# ll
    total 0
    [root@nfs /tmp]# ll
    total 4
    -rw-r--r-- 1 root root 349 Jun 26 21:42 hosts
    

    2.rsync增量备份

    推送
    root@backup /tmp]# rsync -av /etc 172.16.1.31:/tmp/
    etc/yum/vars/infra
    
    sent 27,575,783 bytes  received 37,007 bytes  3,681,705.33 bytes/sec
    total size is 27,448,441  speedup is 0.99
    
    [root@nfs /tmp]# ll
    total 0
    [root@nfs /tmp]# ll
    total 12
    drwxr-xr-x 79 root root 8192 Jun 25 09:12 etc
    
    拉取
    [root@backup /tmp]# ll
    total 0
    [root@backup /tmp]# rsync -av 172.16.1.31:/etc/hosts /tmp
    root@172.16.1.31's password: 
    receiving incremental file list
    hosts
    
    sent 43 bytes  received 440 bytes  138.00 bytes/sec
    total size is 349  speedup is 0.72
    [root@backup /tmp]# ll
    total 4
    -rw-r--r-- 1 root root 349 Jun 25 09:12 hosts
    

    相关文章

      网友评论

          本文标题:架构基础-第一节

          本文链接:https://www.haomeiwen.com/subject/kxahcctx.html