Chinaunix首页 | 论坛 | 博客
  • 博客访问: 3335214
  • 博文数量: 815
  • 博客积分: 12898
  • 博客等级: 上将
  • 技术积分: 7883
  • 用 户 组: 普通用户
  • 注册时间: 2006-12-25 09:57
文章分类

全部博文(815)

文章存档

2014年(1)

2011年(46)

2010年(192)

2009年(121)

2008年(70)

2007年(385)

分类: Oracle

2010-12-18 00:09:53

# cat /opt/storage.sql
-- MySQL dump 10.11
--
-- Host: localhost    Database: atyu30
-- ------------------------------------------------------
-- Server version       5.0.45

/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;

--
-- Table structure for table `storage`
--

DROP TABLE IF EXISTS `storage`;
CREATE TABLE `storage` (
  `id` int(10) NOT NULL auto_increment,
  `starttime` date default NULL,
  `endtime` date default NULL,
  `storage` varchar(20) default NULL,
  `IP` varchar(40) NOT NULL default '',
  `PATH` varchar(40) NOT NULL default '',
  `size` varchar(40) NOT NULL default '',
  `Avail` varchar(40) NOT NULL default '',
  `storage_type` varchar(10) NOT NULL default '' COMMENT '1 online 2 offline 3 mp4 flv 4 ts mtg avi',
  `disk` varchar(40) NOT NULL default '',
  PRIMARY KEY  (`id`),
  KEY `starttime` (`starttime`),
  KEY `endtime` (`endtime`)
) ENGINE=MyISAM AUTO_INCREMENT=21 DEFAULT CHARSET=utf8 COMMENT='存储';

--
-- Dumping data for table `storage`
--

LOCK TABLES `storage` WRITE;
/*!40000 ALTER TABLE `storage` DISABLE KEYS */;
INSERT INTO `storage` VALUES (1,'2008-01-01','2009-06-30','backup1','172.16.11.49','/history/data1/leofs/upload','22T','3.3T','1','/dev/sdb1'),(2,'2009-07-01','2009-09-26','backup2','172.16.11.49','/history/data/leofs/upload','22T','3.3T','1','/dev/sdb1'),(3,'2009-09-27','2010-05-10','backup3','172.16.11.49','/history/data2/leofs/upload','22T','3.3T','1','/dev/sdb1'),(4,'2010-05-10','2010-05-31','backup4','172.16.11.49','/history/data4/leofs/data4/upload','22T','3.3T','1','/dev/sdb1'),(5,'2010-06-01','2010-07-11','backup5','172.16.11.49','/history/data6/leofs/upload','22T','3.3T','1','/dev/sdb1'),(6,'2010-07-12','2010-10-09','backup6','172.16.11.49','/history/data5/upload','22T','3.3T','1','/dev/sdb1'),(7,'2010-10-10','2010-11-08','backup7','172.16.11.12','/data2/data5/upload','22T','2.7T','1','/dev/sdb1'),(8,'2010-10-11','0000-00-00','current','172.16.11.20','/data/upload','22T','14T','1','/dev/sdb1'),(9,'2008-01-01','2010-01-12',NULL,'172.16.11.200','/data/data001','1.9T','0.413','2','/dev/sda1'),(10,'2010-01-13','2010-05-25',NULL,'172.16.11.200','/data/data002','1.9T','0','2','/dev/sdb1'),(11,'2010-05-26','2010-08-13',NULL,'172.16.11.200','/data/data003','1.9T','0','2','/dev/sdc1'),(12,'2010-08-14','2010-09-30',NULL,'172.16.11.200','/data/data004','1.9T','0','2','/dev/sdd1'),(14,'2008-01-01','2010-09-11',NULL,'172.16.11.32','/data/data03/dataa','24T','2.8T','3','/dev/sdd1'),(15,'2010-10-01','2010-12-17',NULL,'172.16.11.32','/data/data03/datab','24T','13T','3','/dev/sdg1'),(16,'0000-00-00','0000-00-00',NULL,'172.16.11.32','/data/data03/datac','24T','24T','3','/dev/sdj1'),(17,'2008-01-01','2010-01-12',NULL,'172.16.11.17','/data/data01/dataa','24T','0.413','4','/dev/sdb1'),(18,'2010-01-13','2010-05-25',NULL,'172.16.11.17','/data/data01/datab','24T','0.593','4','/dev/sdc1'),(19,'2010-05-26','2010-08-13',NULL,'172.16.11.17','/data/data01/datad','24T','0.552','4','/dev/sde1'),(20,'2010-08-14','2010-09-30',NULL,'172.16.11.17','/data/data01/datae','24T','6.6','4','/dev/sdf1');
/*!40000 ALTER TABLE `storage` ENABLE KEYS */;
UNLOCK TABLES;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;

/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;

-- Dump completed on 2010-12-17 14:51:12


# cat /opt/storage.sql | grep INSERT | awk -F'VALUES' '{print $2}'|awk -F'),' '{ i = 1; while ( i <= NF ) { print $i");" i++}}'| awk -F';' '{print $1}' | awk '{print "INSERT INTO storage"$1";"}'
INSERT INTO storage(1,'2008-01-01','2009-06-30','backup1','172.16.11.49','/history/data1/leofs/upload','22T','3.3T','1','/dev/sdb1');
INSERT INTO storage(2,'2009-07-01','2009-09-26','backup2','172.16.11.49','/history/data/leofs/upload','22T','3.3T','1','/dev/sdb1');
INSERT INTO storage(3,'2009-09-27','2010-05-10','backup3','172.16.11.49','/history/data2/leofs/upload','22T','3.3T','1','/dev/sdb1');
INSERT INTO storage(4,'2010-05-10','2010-05-31','backup4','172.16.11.49','/history/data4/leofs/data4/upload','22T','3.3T','1','/dev/sdb1');
INSERT INTO storage(5,'2010-06-01','2010-07-11','backup5','172.16.11.49','/history/data6/leofs/upload','22T','3.3T','1','/dev/sdb1');
INSERT INTO storage(6,'2010-07-12','2010-10-09','backup6','172.16.11.49','/history/data5/upload','22T','3.3T','1','/dev/sdb1');
INSERT INTO storage(7,'2010-10-10','2010-11-08','backup7','172.16.11.12','/data2/data5/upload','22T','2.7T','1','/dev/sdb1');
INSERT INTO storage(8,'2010-10-11','0000-00-00','current','172.16.11.20','/data/upload','22T','14T','1','/dev/sdb1');
INSERT INTO storage(9,'2008-01-01','2010-01-12',NULL,'172.16.11.200','/data/data001','1.9T','0.413','2','/dev/sda1');
INSERT INTO storage(10,'2010-01-13','2010-05-25',NULL,'172.16.11.200','/data/data002','1.9T','0','2','/dev/sdb1');
INSERT INTO storage(11,'2010-05-26','2010-08-13',NULL,'172.16.11.200','/data/data003','1.9T','0','2','/dev/sdc1');
INSERT INTO storage(12,'2010-08-14','2010-09-30',NULL,'172.16.11.200','/data/data004','1.9T','0','2','/dev/sdd1');
INSERT INTO storage(14,'2008-01-01','2010-09-11',NULL,'172.16.11.32','/data/data03/dataa','24T','2.8T','3','/dev/sdd1');
INSERT INTO storage(15,'2010-10-01','2010-12-17',NULL,'172.16.11.32','/data/data03/datab','24T','13T','3','/dev/sdg1');
INSERT INTO storage(16,'0000-00-00','0000-00-00',NULL,'172.16.11.32','/data/data03/datac','24T','24T','3','/dev/sdj1');
INSERT INTO storage(17,'2008-01-01','2010-01-12',NULL,'172.16.11.17','/data/data01/dataa','24T','0.413','4','/dev/sdb1');
INSERT INTO storage(18,'2010-01-13','2010-05-25',NULL,'172.16.11.17','/data/data01/datab','24T','0.593','4','/dev/sdc1');
INSERT INTO storage(19,'2010-05-26','2010-08-13',NULL,'172.16.11.17','/data/data01/datad','24T','0.552','4','/dev/sde1');
INSERT INTO storage(20,'2010-08-14','2010-09-30',NULL,'172.16.11.17','/data/data01/datae','24T','6.6','4','/dev/sdf1');

阅读(1439) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~