http://wiki.sunyear.com.tw/index.php?title=FirebirdSQL/2/6&feed=atom&action=history
FirebirdSQL/2/6 - 修訂沿革
2024-03-29T05:37:58Z
本站上此頁的修訂沿革
MediaWiki 1.16.0
http://wiki.sunyear.com.tw/index.php?title=FirebirdSQL/2/6&diff=2159&oldid=prev
Goto-dream在2005年1月27日 (四) 07:50
2005-01-27T07:50:13Z
<p></p>
<p><b>新頁面</b></p><div>=== gbak command-line tool ===<br />
<br />
1.''' Database backup '''<br />
1)gbak [-B] [options] database target<br />
2)gbak [-B] [options] database target1 size1[k|m|g] target2 [ size2[k|m|g] target3<br />
<br />
|| options || 說明 || <br />
|| -b[ackup_database] || 備份資料庫或設備 || <br />
|| -co[nvert] || Converts external files as internal tables || <br />
|| -e[xpand] || Creates a noncompressed back up ||<br />
|| -fa[ctor] n || Uses blocking factor n for tape device ||<br />
|| -g[arbage_collect] || Does not garbage collect during backup ||<br />
|| -ig[nore] || Ignores checksums during backup ||<br />
|| -l[imbo] || Ignores limbo transactions during backup ||<br />
|| -m[etadata] || Backs up metadata only, no data ||<br />
|| -nt || Creates the backup in nontransportable format ||<br />
|| -ol[d_descriptions] || Backs up metadata in old-style format ||<br />
|| -pa[ssword] text || Checks for password text before accessing a database ||<br />
|| -role name || Connects as role name ||<br />
|| -se[rvice] servicename || servicename invokes the Service Manager on the server host; ||<br />
|| -t[ransportable]|| Creates a transportable backup [default]||<br />
|| -u[ser] name || Checks for user name before accessing remote database||<br />
|| -v[erbose] || Shows what gbak is doing ||<br />
|| -y [file | suppress_output] || suppress output messages||<br />
|| -z || Show version of gbak and of InterBase engine||<br />
<br />
2.''' Restoring a database '''<br />
1)gbak {-C|-R} [options] source dbfile<br />
2)gbak {-C|-R} [options] source dbfile1 size1 dbfile2 [ size2 dbfile3 …]<br />
3)gbak {-C|-R} [options] source1 source2 [ source3 …] dbfile<br />
4)gbak {-C|-R} [options] source1 source2 [ source3 …] dbfile1 size1 dbfile2 [ size2 dbfile3 …]<br />
<br />
|| options || 說明 || <br />
|| source || 要還原的備份資料庫後的檔案 || <br />
|| dbfile || 還原後的資料庫 || <br />
|| size || 還原後的資料庫大小||<br />
|| -c[reate_database] || 回存到新的資料庫||<br />
|| -bu[ffers] || 設定資料庫的快取區大小||<br />
|| -i[nactive] || Makes indexes inactive upon restore||<br />
|| -k[ill] || 不要製造shadows檔案 ||<br />
|| -mo[de] [read_write | read_only} || 設定資料庫回存時存取模式(read_only , read_write)||<br />
|| -n[o_validity] || Deletes validity constraints from restored metadata; allows restoration of data that would otherwise not meet validity constraints||<br />
|| -o[ne_at_a_time] || Restores one table at a time||<br />
|| -p[age_size] n|| 資料頁大小 (1024, 2048, 4196, or 8192);預設為 1024 ||<br />
|| -pa[ssword] text || 使用者密碼 ||<br />
|| -r[eplace_database] || 若有資料庫存在時,可以覆蓋 ||<br />
|| -se[rvice] servicename || 伺服器名稱,參考-service 使用說明||<br />
<br />
3. ''' -service 使用說明 '''<br />
|| 通訊協定 || 語法 || <br />
|| TCP/IP || hostname:service_mgr || <br />
|| Named pipes || \\hostname\service_mgr|| <br />
|| Local || service_mgr||<br />
<br />
4.''' 備份資料庫的例子 '''<br />
<code><br />
1.<br />
gbak -b -user joe -pa blurf@ jupiter:/foo.gdb foo.gbk<br />
2.<br />
gbak -b -user joe -pa blurf@ jupiter:/foo.gdb C:\archive\foo.gbk <br />
3.<br />
gbak -b -user joe -pa blurf@ -se jupiter:service_mgr /foo.gdb /backup/foo.gbk<br />
4.<br />
gbak -b -user joe -pa blurf@ -co -t -se jupiter:service_mgr /foo1.gdb /backup/backup1.gbk 500k /backup/backup2.gbk 500k /backup/lastBackup.gbk<br />
</code><br />
<br />
5.''' 還原資料庫的例子 '''<br />
<code><br />
1.<br />
gbak -r -user joe -pa blurf@ C:\archive\foo.gbk jupiter:/foo.gdb<br />
2.<br />
gbak -r user -joe -pa blurf@ -se <br />
jupiter:service_mgr /backup/foo1.gbk /backup/foo2.gbk /backup/fooLast.gbk /companydb/foo1.gdb 500 /companydb/foo2.gdb 500 /companydb/fooLast.gdb<br />
3.<br />
gbak -r user -joe -pa blurf@ -se jupiter:service_mgr /backup/foo.gbk /luto:/companydb/foo.gdb<br />
</code><br />
<br />
<br />
=== [http://vfp.sunyear.com.tw/viewtopic.php?t=231&highlight=dbtool DBTOOLS維護精靈] ===<br />
使用VFP開發的版本,附原始碼.<br />
http://vfp.sunyear.com.tw/files/11_1063219595.jpg<br />
<br />
=== 工具下載 ===<br />
[http://vfp.sunyear.com.tw/viewtopic.php?t=231&highlight=dbtool DBTOOLS維護精靈]<br />
[http://www.bcp-software.nl/backuprunner/index.html GBAK BackupRunner]</div>
Goto-dream