<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>聰明的生活2 &#187; 備份</title>
	<atom:link href="http://blog.yslifes.com/archives/category/backup/feed" rel="self" type="application/rss+xml" />
	<link>http://blog.yslifes.com</link>
	<description>自己寫java程式的一些筆記</description>
	<lastBuildDate>Tue, 27 Jul 2010 02:13:45 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
	<atom:link rel='hub' href='http://blog.yslifes.com/?pushpress=hub'/>
	
<!-- Start Of Script Generated By WP-PostViews Plus -->
<script type='text/javascript' src='http://blog.yslifes.com/wp-includes/js/jquery/jquery.js?ver=1.4.2'></script>
<script type="text/javascript">
/* <![CDATA[ */
jQuery.ajax({type:'GET',url:'http://blog.yslifes.com/wp-content/plugins/wp-postviews-plus/postviews_plus.php',data:'todowppvp=add&type=cat&id=47_1',cache:false,dataType:'script'});
/* ]]> */
</script>
<!-- End Of Script Generated By WP-PostViews Plus -->
	<item>
		<title>Windows環境下使用Dos指令製作備援計畫</title>
		<link>http://blog.yslifes.com/archives/326</link>
		<comments>http://blog.yslifes.com/archives/326#comments</comments>
		<pubDate>Tue, 23 Jun 2009 12:34:48 +0000</pubDate>
		<dc:creator>yku</dc:creator>
				<category><![CDATA[command]]></category>
		<category><![CDATA[備份]]></category>
		<category><![CDATA[dos]]></category>
		<category><![CDATA[WINDOWS]]></category>
		<category><![CDATA[日期目錄]]></category>

		<guid isPermaLink="false">http://blog.yslifes.com/archives/326</guid>
		<description><![CDATA[有自己的Server，平常沒事時主機安祥的運作著，不過不怕一萬只怕萬一，很多時候不小心改了程式、昇級Server、程式，主機當掉等，一個不小心出了問題，可是要人命的，主機的回覆就算了，資料的不見可是十分要命，重要的照片、文章不見了，我想這是大家所不想見的，在大多數的企業裡，系統資料的備援都有自己的一套計畫，也是年度稽核的重點。 不過像我這種用自己的家機當Server的人，沒有企業的大成本，SCSI容錯、磁帶…等等等，要怎麼做呢？這裡提供一個在Windows下環境可用的方式，不過需要配合壓縮程式7-Zip或其它壓縮軟體及Dos指令。 想法： １建立一個日期目錄，以資區別不同日期的備份。 &#160; ２拷貝資料到此日期目錄下所建立的子目錄，以區別不同內容。 ３利用7-Zip壓縮檔案，減少空間的使用。 ４刪除日期目錄下所有資料及資料夾。 ５建立排程執行，請依需要排訂每日？每週？或是隔週？等… 為什麼要拷貝內容到另外的資料夾而不直接指定路徑做壓縮檔呢？其實考量點很簡單，怕在壓縮期間發生檔案使用中或是檔案移除等問題，所以先複製一份，雖然會增加I/O的使用，不過這是相對比較好的方式。 set yymmdd_hhmmss=d:\backup\%date:~0,4%%date:~5,2%%date:~8,2%_%time:~0,2%%time:~3,2%%time:~6,2% set path=%path%;C:\Program Files\7-Zip md %yymmdd_hhmmss%\mysql xcopy /E /C /H /Y C:\MySQL\data %yymmdd_hhmmss%\mysql &#62; %yymmdd_hhmmss%\mysql.txt 7z a -scsUTF-8 -mx=9 %yymmdd_hhmmss%.7z %yymmdd_hhmmss%\* del /S /Q %yymmdd_hhmmss% rd /S /Q %yymmdd_hhmmss% 說明： 日期目錄的使用請參照： dos指令-建立日期目錄 md 建立目錄 xcopy 複製資料到剛才建立的目錄裡，其中/E /C /H /Y 則是有任何錯誤繼續執行、不需請求回覆要求、包含子目錄及其內容等。 7z a 7-Zip的壓縮指令-scsUTF-8使用UTF-8編碼，-mx=9，使用最高壓縮比，當然時間會拉長。 del [...]]]></description>
		<wfw:commentRss>http://blog.yslifes.com/archives/326/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>dos指令-建立日期目錄</title>
		<link>http://blog.yslifes.com/archives/172</link>
		<comments>http://blog.yslifes.com/archives/172#comments</comments>
		<pubDate>Fri, 15 May 2009 14:17:42 +0000</pubDate>
		<dc:creator>yku</dc:creator>
				<category><![CDATA[command]]></category>
		<category><![CDATA[備份]]></category>
		<category><![CDATA[架站]]></category>
		<category><![CDATA[日期目錄]]></category>

		<guid isPermaLink="false">http://blog.yslifes.com/archives/172</guid>
		<description><![CDATA[可以利用這個指令來每天建立一個日期目錄存放需要的資料 set hh=%time:~0,2% set yymmdd_hhmmss=%date:~12,2%%date:~4,2%%date:~7,2%_%hh%%time:~3,2%%time:~6,2% md h:\%yymmdd_hhmmss% 可以把這個方法寫在bat檔裡，按下去就可以執行了 補充二個指令 1. rem 此行不執行 rem help 以上此行會被略過不執行 2.目錄存在則不建立，目錄不存在則建立 @if not exist d:\AAA\ goto 4 @goto end :4 d: cd\ md AAA :end 以上的意思是d糟AAA目錄不存在時則建立目錄 否則則不做動作 可以配合日期目錄來做檢查及建立]]></description>
		<wfw:commentRss>http://blog.yslifes.com/archives/172/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
