zoukankan      html  css  js  c++  java
  • Linux数据备份

    1、完整备份

    常用工具:dd cpio dump/restore  tar

     tar -N

    2、增量备份

    dump

    3、差异备份

    rsync镜像备份

    Centos6.5安装rsync

    http://linux.it.net.cn/CentOS/course/2016/0402/20926.html

    同步远程文件到本地

    rsync -avz root@192.168.200.10:/var/lib/rpm  /root/temp

    如果本地有的文件远程没有,则删除

    rsync -rave "ssh -p 22 -l root" --delete 192.168.0.200:/www/web/ /www/web/
    用-e参数指定远程ssh
    rsync -avz -e ssh root@192.168.200.10:/var/lib/rpm /root/temp

    4、ftp

     直接文件下载备份

    5、ssh命令备份

    生成公钥/私钥

    ssh-keygen -t rsa -P ''

    ssh-keygen -t rsa

    复制公钥到目的机

    scp .ssh/id_rsa.pub  chenlb@192.168.1.181:/home/chenlb/id_rsa.pub 

    B机把从A机复制的id_rsa.pub添加到.ssh/authorzied_keys文件里

    cat id_rsa.pub >> .ssh/authorized_keys

    chmod 600 .ssh/authorized_keys

    登录目的机

    ssh 192.168.1.181

  • 相关阅读:
    1924班网址
    20192414《网络空间安全导论》第一周学习总结
    H-Angry
    A-Plague Inc
    B-Rolling The Polygon
    F-Moving On
    A-Maximum Element In A Stack
    J-Word Search
    E-Pawns
    D-Lift Problems
  • 原文地址:https://www.cnblogs.com/wangwanchao/p/5705157.html
Copyright © 2011-2022 走看看