linux之数据备份
来源:互联网 发布:javmoo.net最新域名 编辑:程序博客网 时间:2024/05/24 01:20
第一种方法:tar备份
[root@bogon ~]# cat bp/linux.txt no centos[root@bogon ~]# tar cvf bp.tar bp //打包bp目录bp/bp/bp/bp/bp/a.txtbp/kali.txtbp/linux.txt[root@bogon ~]# echo "this is centos">bp/linux.txt //把内容修改[root@bogon ~]# cat bp/linux.txt this is centos[root@bogon ~]# tar xvf bp.tar //还原bp/bp/bp/bp/bp/a.txtbp/kali.txtbp/linux.txt[root@bogon ~]# cat bp/linux.txt //文件内容得以还原no centos[root@bogon ~]# tar zcvf bp.tar.gz bp //因为tar不对文件进行压缩,所以打包后的文件会很大,一般在打包的同时进行压缩bp/bp/bp/bp/bp/a.txtbp/kali.txtbp/linux.txt[root@bogon ~]# lsanaconda-ks.cfg bp.tar.gz Documents initial-setup-ks.cfg Music Pictures Templatesbp Desktop Downloads linux.txt original-ks.cfg Public Videos[root@bogon ~]# cat bp/linux.txtno centos[root@bogon ~]# echo 'bp'>bp/linux.txt[root@bogon ~]# cat bp/linux.txtbp[root@bogon ~]# tar -zxvf bp.tar.gz bp/bp/bp/bp/bp/a.txtbp/kali.txtbp/linux.txt[root@bogon ~]# cat bp/linux.txt //还原no centos[root@bogon ~]#
第二种方法:contab备份,我的其他博客写有使用方法了,这里不再重复
阅读全文
0 0
- linux之数据备份
- Linux系统之备份数据
- linux之rsync远程数据同步备份
- linux之rsync远程数据同步备份
- linux数据备份脚本
- Linux数据备份手册
- linux 数据备份
- linux数据备份
- Linux数据备份
- linux 每天备份mysql数据
- linux 每天备份mysql数据
- Linux定期数据备份脚本
- Linux web服务器数据备份
- Linux 自动备份mysql数据
- oracle 管理 之 数据备份
- 分布式存储系统 之 数据备份
- Linux之全系统备份恢复
- Linux之全系统备份恢复
- php实现mysql数据的增删改查代码
- Oracle 10g 到11g的数据迁移 导入导出 顺序步骤 expdp/impdp
- codeforces-546E. Soldier and Traveling(网络流)
- linux scp命令
- Spring Boot-自定义配置
- linux之数据备份
- Linux基础(五)
- 服务器大全
- 程序人生(一)
- 正则表达式匹配
- 日期管理类 → AppDateMgr
- vue.js入门学习(搭建环境和测试demo)
- 百度地图 遍历marker并增加窗口 只显示最后一个窗口信息的问题
- Redis 启动的三种方法