tar 命令会更改源文件吗 今天用了下这个命令,结果把源文件给改了 怎么恢复回去,导致现在数据库起步来 ,请大家知道的 说说.
[root@localhost orcl]# tar -cvf /u01/app/oracle/oradata/orcl/* asd.tar
[root@localhost orcl]# ls -l
总用量 996728
-rw-r----- 1 oracle dba 14417920 5月 11 19:29 control01.ctl
-rw-r----- 1 oracle dba 9748480 5月 11 17:41 control02.ctl
-rw-r----- 1 oracle dba 9748480 5月 11 17:41 control03.ctl
-rw-r----- 1 oracle dba 104865792 5月 8 14:16 example01.dbf
-rw-r----- 1 oracle dba 52429312 5月 8 14:15 redo01.log
-rw-r----- 1 oracle dba 52429312 5月 8 10:20 redo02.log
-rw-r----- 1 oracle dba 52429312 5月 8 10:20 redo03.log
-rw-r----- 1 oracle dba 723525632 5月 8 14:16 system01.dbf
[root@localhost orcl]# tar -cvf /u01/app/oracle/oradata/orcl/* asd.tar
tar: Removing leading `/' from member names
u01/app/oracle/oradata/orcl/control02.ctl
u01/app/oracle/oradata/orcl/control03.ctl
u01/app/oracle/oradata/orcl/example01.dbf[root@localhost orcl]# ls -l
总用量 1013164
-rw-r----- 1 oracle dba 31232000 5月 11 19:30 control01.ctl
-rw-r----- 1 oracle dba 9748480 5月 11 17:41 control02.ctl
-rw-r----- 1 oracle dba 9748480 5月 11 17:41 control03.ctl
-rw-r----- 1 oracle dba 104865792 5月 8 14:16 example01.dbf
-rw-r----- 1 oracle dba 52429312 5月 8 14:15 redo01.log
-rw-r----- 1 oracle dba 52429312 5月 8 10:20 redo02.log
-rw-r----- 1 oracle dba 52429312 5月 8 10:20 redo03.log
-rw-r----- 1 oracle dba 723525632 5月 8 14:16 system01.dbf
[root@localhost orcl]# tar -cvf /u01/app/oracle/oradata/orcl/* asd.tar
[root@localhost orcl]# ls -l
总用量 996728
-rw-r----- 1 oracle dba 14417920 5月 11 19:29 control01.ctl
-rw-r----- 1 oracle dba 9748480 5月 11 17:41 control02.ctl
-rw-r----- 1 oracle dba 9748480 5月 11 17:41 control03.ctl
-rw-r----- 1 oracle dba 104865792 5月 8 14:16 example01.dbf
-rw-r----- 1 oracle dba 52429312 5月 8 14:15 redo01.log
-rw-r----- 1 oracle dba 52429312 5月 8 10:20 redo02.log
-rw-r----- 1 oracle dba 52429312 5月 8 10:20 redo03.log
-rw-r----- 1 oracle dba 723525632 5月 8 14:16 system01.dbf
[root@localhost orcl]# tar -cvf /u01/app/oracle/oradata/orcl/* asd.tar
tar: Removing leading `/' from member names
u01/app/oracle/oradata/orcl/control02.ctl
u01/app/oracle/oradata/orcl/control03.ctl
u01/app/oracle/oradata/orcl/example01.dbf[root@localhost orcl]# ls -l
总用量 1013164
-rw-r----- 1 oracle dba 31232000 5月 11 19:30 control01.ctl
-rw-r----- 1 oracle dba 9748480 5月 11 17:41 control02.ctl
-rw-r----- 1 oracle dba 9748480 5月 11 17:41 control03.ctl
-rw-r----- 1 oracle dba 104865792 5月 8 14:16 example01.dbf
-rw-r----- 1 oracle dba 52429312 5月 8 14:15 redo01.log
-rw-r----- 1 oracle dba 52429312 5月 8 10:20 redo02.log
-rw-r----- 1 oracle dba 52429312 5月 8 10:20 redo03.log
-rw-r----- 1 oracle dba 723525632 5月 8 14:16 system01.dbf
解决方案 »
- 普通用户User_Tables 查询,其结果中出现了大量含有$的表,每一个用户下都包含这些表,请问大侠们是什么原因?
- Mysql workbench 5.2 ce 出现内存不能为“读”错误
- netca
- 一张非分区表改为分区表有什么比较好的方法?
- 请教,ORACLE中与TRIM相对的,将字符串搞成固定长度,不足填空格的语句
- 急,下面的语句为什么不产生文件?否则下岗了
- 求一个正则的写法
- query的edit方法问题
- [救急:往oracle数据库里添加大量测试数据的方法]http://expert.csdn.net/Expert/topic/1471/1471094.xml
- 在设置自增字段时,写的触发器为什么不能执行?
- 急啊,快来解决以下咯
- 请问有什么办法能将ACCESS数据导入ORACLE?
tar -cvf 生成文件名 源文件名
你写反了。
按照我们的逻辑好像是正常的:将文件打包成(tar -... 源文件 目标文件)
可是老外的逻辑刚好反过来:打包成将文件想到这些,感觉像是回到了以前学习英语的时候,呵呵
-rw-r----- 1 oracle dba 14417920 5月 11 19:29 control01.ctl 执行了tar命令后是下面的看来是变了,大家说奇怪吗 怎么会这样呢? 我的控制文件啊.重要的控制文件啊.
-rw-r----- 1 oracle dba 31232000 5月 11 19:30 control01.ctl 我如何能够搞到从前去,回到从前,给点思路? 如果你们遇到了,你们怎么去解决打算?
-rw-r----- 1 oracle dba 31232000 5月 11 19:30 control01.ctl
-rw-r----- 1 oracle dba 9748480 5月 11 17:41 control02.ctl
-rw-r----- 1 oracle dba 9748480 5月 11 17:41 control03.ctl 上述3个文件,是冗余备份的关系. 对比看, 后面两个文件大小相同,判断为正确的文件,可以覆盖恢复第一个文件.
对啊,control文件有三个,本来就是其备份作用的,你复制control02或control03,改成control01不就能启动了