images\cherry_red.png1 Linux运维学习笔记
      images\cherry_blue.png1.1 基本操作命令
         images\cherry_orange.png1.1.1 权限管理
            images\cherry_cyan.png1.1.1.1 chmod
            images\cherry_cyan.png1.1.1.2 chown
            images\cherry_cyan.png1.1.1.3 setfacl
            images\cherry_cyan.png1.1.1.4 chattr
         images\cherry_orange.png1.1.2 用户管理
            images\cherry_cyan.png1.1.2.1 useradd(添加用户)
            images\cherry_cyan.png1.1.2.2 passwd(修改用户密码)
            images\cherry_cyan.png1.1.2.3 userdel(删除用户角色)
            images\cherry_cyan.png1.1.2.4 usermod(修改用户信息)
            images\cherry_cyan.png1.1.2.5 groupadd(添加工作组)
            images\cherry_cyan.png1.1.2.6 groupdel(删除工作组)
         images\cherry_orange.png1.1.3 文件管理
            images\cherry_cyan.png1.1.3.1 cat
            images\cherry_cyan.png1.1.3.2 mv
            images\cherry_cyan.png1.1.3.3 scp,rsync文件传输
               images\cherry_orange_dark.png1.1.3.3.1 scp
            images\cherry_cyan.png1.1.3.4 rz
            images\cherry_cyan.png1.1.3.5 awk
               images\cherry_orange_dark.png1.1.3.5.1 案例
            images\cherry_cyan.png1.1.3.6 cp复制
            images\cherry_cyan.png1.1.3.7 more
            images\cherry_cyan.png1.1.3.8 less
            images\cherry_cyan.png1.1.3.9 mkdir
            images\cherry_cyan.png1.1.3.10 diff
            images\cherry_cyan.png1.1.3.11 head
            images\cherry_cyan.png1.1.3.12 tail
            images\cherry_cyan.png1.1.3.13 sed
            images\cherry_cyan.png1.1.3.14 sort
            images\cherry_cyan.png1.1.3.15 uniq (去重语句)
            images\cherry_cyan.png1.1.3.16 grep
               images\cherry_orange_dark.png1.1.3.16.1 grep(2)
            images\cherry_cyan.png1.1.3.17 xargs
            images\cherry_cyan.png1.1.3.18 tr
            images\cherry_cyan.png1.1.3.19 cut
            images\cherry_cyan.png1.1.3.20 od
            images\cherry_cyan.png1.1.3.21 dos2unix
            images\cherry_cyan.png1.1.3.22 cpio
            images\cherry_cyan.png1.1.3.23 tee
            images\cherry_cyan.png1.1.3.24 column
            images\cherry_cyan.png1.1.3.25 swapon
         images\cherry_orange.png1.1.4 软件包管理
            images\cherry_cyan.png1.1.4.1 yarn
            images\cherry_cyan.png1.1.4.2 zip
         images\cherry_orange.png1.1.5 备份策略
            images\cherry_cyan.png1.1.5.1 tar
            images\cherry_cyan.png1.1.5.2 cp
      images\cherry_blue.png1.2 系统工作常用命令
         images\cherry_orange.png1.2.1 ab(压力测试)
            images\cherry_cyan.png1.2.1.1 ab常见问题
         images\cherry_orange.png1.2.2 nohup
            images\cherry_cyan.png1.2.2.1 bg fg
         images\cherry_orange.png1.2.3 crontab
         images\cherry_orange.png1.2.4 find
            images\cherry_cyan.png1.2.4.1 find
         images\cherry_orange.png1.2.5 tcpdump
         images\cherry_orange.png1.2.6 ifconfig
         images\cherry_orange.png1.2.7 netstat(网络通信情况)
         images\cherry_orange.png1.2.8 ps (查看系统进程)
         images\cherry_orange.png1.2.9 top (系统运维状态)
         images\cherry_orange.png1.2.10 alias
         images\cherry_orange.png1.2.11 pidof
         images\cherry_orange.png1.2.12 kill与killall与pkill
         images\cherry_orange.png1.2.13 uptime(系统负载信息)
         images\cherry_orange.png1.2.14 free(系统内存情况)
         images\cherry_orange.png1.2.15 last(登陆日志)
         images\cherry_orange.png1.2.16 fdisk(磁盘分区)
         images\cherry_orange.png1.2.17 strace
         images\cherry_orange.png1.2.18 lsmod
         images\cherry_orange.png1.2.19 ssh
            images\cherry_cyan.png1.2.19.1 sshpass
         images\cherry_orange.png1.2.20 ftp (sftp)
         images\cherry_orange.png1.2.21 du
         images\cherry_orange.png1.2.22 umask(文件权限)
         images\cherry_orange.png1.2.23 df (磁盘占用情况)
         images\cherry_orange.png1.2.24 curl
         images\cherry_orange.png1.2.25 date
         images\cherry_orange.png1.2.26 lsof
         images\cherry_orange.png1.2.27 chrony
         images\cherry_orange.png1.2.28 cpu运行状态
         images\cherry_orange.png1.2.29 lshw
         images\cherry_orange.png1.2.30 vim
         images\cherry_orange.png1.2.31 lsb_release -a (系统版本信息)
      images\cherry_blue.png1.3 网络基础
         images\cherry_orange.png1.3.1 ifconfig
         images\cherry_orange.png1.3.2 route
         images\cherry_orange.png1.3.3 nslookup
         images\cherry_orange.png1.3.4 ping网关
         images\cherry_orange.png1.3.5 ISO/OSI七层模型
         images\cherry_orange.png1.3.6 TCP/IP三次握手(四次挥手)
            images\cherry_cyan.png1.3.6.1 三次握手
            images\cherry_cyan.png1.3.6.2 四次挥手
         images\cherry_orange.png1.3.7 IP地址网段(可用IP地址)(广播地址)
         images\cherry_orange.png1.3.8 网络连接数
         images\cherry_orange.png1.3.9 mtr
         images\cherry_orange.png1.3.10 ip
      images\cherry_blue.png1.4 系统管理类
         images\cherry_orange.png1.4.1 进程与线程
            images\cherry_cyan.png1.4.1.1 pstree
         images\cherry_orange.png1.4.2 系统安全
            images\cherry_cyan.png1.4.2.1 记录一次远程挖矿病毒
            images\cherry_cyan.png1.4.2.2 漏洞修补
         images\cherry_orange.png1.4.3 nfs远程挂载
            images\cherry_cyan.png1.4.3.1 nfs自动挂载
         images\cherry_orange.png1.4.4 查询系统用户登录情况
         images\cherry_orange.png1.4.5 权限优化
         images\cherry_orange.png1.4.6 备份策略
         images\cherry_orange.png1.4.7 Raid(磁盘阵列)
         images\cherry_orange.png1.4.8 资源查看(监控)
            images\cherry_cyan.png1.4.8.1 dstat(网络监控)
         images\cherry_orange.png1.4.9 启动流程
         images\cherry_orange.png1.4.10 系统优化
         images\cherry_orange.png1.4.11 cpu
      images\cherry_blue.png1.5 Shell编程
         images\cherry_orange.png1.5.1 数组类型
         images\cherry_orange.png1.5.2 if 条件判断
         images\cherry_orange.png1.5.3 for
         images\cherry_orange.png1.5.4 文本截取
         images\cherry_orange.png1.5.5 随机字符串
         images\cherry_orange.png1.5.6 网站检测
            images\cherry_cyan.png1.5.6.1 nmap
         images\cherry_orange.png1.5.7 Debug
         images\cherry_orange.png1.5.8 declare
      images\cherry_blue.png1.6 网络服务类
         images\cherry_orange.png1.6.1 网关
         images\cherry_orange.png1.6.2 SSH服务
         images\cherry_orange.png1.6.3 DHCP + FTP
         images\cherry_orange.png1.6.4 DNS服务
            images\cherry_cyan.png1.6.4.1 智能DNS
         images\cherry_orange.png1.6.5 Apache配置
            images\cherry_cyan.png1.6.5.1 Apache 三种工作模式
         images\cherry_orange.png1.6.6 Apache优化
            images\cherry_cyan.png1.6.6.1 CDN
         images\cherry_orange.png1.6.7 Nginx配置
            images\cherry_cyan.png1.6.7.1 nginx开启SSL证书
            images\cherry_cyan.png1.6.7.2 Session一致性解决方案
            images\cherry_cyan.png1.6.7.3 异步非阻塞方式
            images\cherry_cyan.png1.6.7.4 Nginx反向代理配置出现问题
            images\cherry_cyan.png1.6.7.5 nginx 负载均衡算法
            images\cherry_cyan.png1.6.7.6 nginx status
         images\cherry_orange.png1.6.8 Nginx优化
            images\cherry_cyan.png1.6.8.1 Nginx请求PHP(Tomcat)过程
            images\cherry_cyan.png1.6.8.2 gzip压缩
            images\cherry_cyan.png1.6.8.3 缓存优化
            images\cherry_cyan.png1.6.8.4 反向代理
         images\cherry_orange.png1.6.9 http状态码
      images\cherry_blue.png1.7 数据库管理类
         images\cherry_orange.png1.7.1 集群部署(Amoeba)
         images\cherry_orange.png1.7.2 索引
         images\cherry_orange.png1.7.3 误操作Drop语句如何解决?
         images\cherry_orange.png1.7.4 Redis(缓存数据库)
            images\cherry_cyan.png1.7.4.1 Redis_
      images\cherry_blue.png1.8 Good Luck
      images\cherry_blue.png1.9 Linux(实际工作可能常用命令)
      images\cherry_blue.png1.10 LeetCode(Bash)
         images\cherry_orange.png1.10.1 统计词频
         images\cherry_orange.png1.10.2 有效电话号码
   images\cherry_red.png2 三剑客
      images\cherry_blue.png2.1 正则表达式
         images\cherry_orange.png2.1.1 扩展正则表达式
      images\cherry_blue.png2.2 grep(...过滤)
      images\cherry_blue.png2.3 sed(...替换)
         images\cherry_orange.png2.3.1 sed删除,增加
         images\cherry_orange.png2.3.2 sed 替换
      images\cherry_blue.png2.4 awk(...取列统计)
         images\cherry_orange.png2.4.1 awk模式匹配
         images\cherry_orange.png2.4.2 awk数组
一般有三种备份策略

一般Linux系统的命令
cp -pdf 【备份文件】 【备份后的文件】 or cp -a 【备份文件】【备份后文件】
-a:相当于pdr
-d:复制链接文件,目标文件也是指向源文件链接的链接文件或目录。
-i:目标文件已存在时,会询问是否覆盖
-p:连同档案的属性一起复制。常用于备份
-r:递归复制,用于复制目录
-s:复制为符号链接文件,也就是快捷方式,链接文件被删除,符号链接文件失效。
-l:进行硬式链接的连结档建立,而非复制档案本身,源文件删除,目标文件依旧在。


images\91-1.png

1,完整备份
完整的备份,对于整个目录而言,整个硬盘
2,增量备份
2,1 累计增量备份是指先进行一次完全备份,服务器运行一段时间之后,比较当前系统和完全备份的备份数据之间的差异,只备份有差异的数据。服务器继续运行,再经过一段时间,进行第二次增量备份。在进行第二次增量备份时,当前系统和第一次增量备份的数据进行比较,也是只备份有差异的数据。第三次增量备份是和第二次增量备份的数据进行比较,以此类推。
images\91-2.png

优点: 备份的量大大减小
缺点: 恢复起来比较的慢
3,差异备份
差异增量备份(后续简称差异备份)也要先进行一次完全备份,但是和累计增量备份不同的是,每次差异备份都备份和原始的完全备份不同的数据。也就是说,差异备份每次备份的参照物都是原始的完全备份,而不是上一次的差异备份
images\91-3.png