FirebirdSQL/2/6

出自VFP Wiki

(修訂版本間差異)
跳轉到: 導航, 搜尋

在2005年1月27日 (四) 07:50的最新修訂版本

gbak command-line tool

1. Database backup 1)gbak [-B] [options] database target 2)gbak [-B] [options] database target1 size1[k|m|g] target2 [ size2[k|m|g] target3

|| options || 說明 || || -b[ackup_database] || 備份資料庫或設備 || || -co[nvert] || Converts external files as internal tables || || -e[xpand] || Creates a noncompressed back up || || -fa[ctor] n || Uses blocking factor n for tape device || || -g[arbage_collect] || Does not garbage collect during backup || || -ig[nore] || Ignores checksums during backup || || -l[imbo] || Ignores limbo transactions during backup || || -m[etadata] || Backs up metadata only, no data || || -nt || Creates the backup in nontransportable format || || -ol[d_descriptions] || Backs up metadata in old-style format || || -pa[ssword] text || Checks for password text before accessing a database || || -role name || Connects as role name || || -se[rvice] servicename || servicename invokes the Service Manager on the server host; || || -t[ransportable]|| Creates a transportable backup [default]|| || -u[ser] name || Checks for user name before accessing remote database|| || -v[erbose] || Shows what gbak is doing || || -y [file | suppress_output] || suppress output messages|| || -z || Show version of gbak and of InterBase engine||

2. Restoring a database 1)gbak {-C|-R} [options] source dbfile 2)gbak {-C|-R} [options] source dbfile1 size1 dbfile2 [ size2 dbfile3 …] 3)gbak {-C|-R} [options] source1 source2 [ source3 …] dbfile 4)gbak {-C|-R} [options] source1 source2 [ source3 …] dbfile1 size1 dbfile2 [ size2 dbfile3 …]

|| options || 說明 || || source || 要還原的備份資料庫後的檔案 || || dbfile || 還原後的資料庫 || || size || 還原後的資料庫大小|| || -c[reate_database] || 回存到新的資料庫|| || -bu[ffers] || 設定資料庫的快取區大小|| || -i[nactive] || Makes indexes inactive upon restore|| || -k[ill] || 不要製造shadows檔案 || || -mo[de] [read_write | read_only} || 設定資料庫回存時存取模式(read_only , read_write)|| || -n[o_validity] || Deletes validity constraints from restored metadata; allows restoration of data that would otherwise not meet validity constraints|| || -o[ne_at_a_time] || Restores one table at a time|| || -p[age_size] n|| 資料頁大小 (1024, 2048, 4196, or 8192);預設為 1024 || || -pa[ssword] text || 使用者密碼 || || -r[eplace_database] || 若有資料庫存在時,可以覆蓋 || || -se[rvice] servicename || 伺服器名稱,參考-service 使用說明||

3. -service 使用說明 || 通訊協定 || 語法 || || TCP/IP || hostname:service_mgr || || Named pipes || \\hostname\service_mgr|| || Local || service_mgr||

4. 備份資料庫的例子 1. gbak -b -user joe -pa blurf@ jupiter:/foo.gdb foo.gbk 2. gbak -b -user joe -pa blurf@ jupiter:/foo.gdb C:\archive\foo.gbk 3. gbak -b -user joe -pa blurf@ -se jupiter:service_mgr /foo.gdb /backup/foo.gbk 4. 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

5. 還原資料庫的例子 1. gbak -r -user joe -pa blurf@ C:\archive\foo.gbk jupiter:/foo.gdb 2. gbak -r user -joe -pa blurf@ -se jupiter:service_mgr /backup/foo1.gbk /backup/foo2.gbk /backup/fooLast.gbk /companydb/foo1.gdb 500 /companydb/foo2.gdb 500 /companydb/fooLast.gdb 3. gbak -r user -joe -pa blurf@ -se jupiter:service_mgr /backup/foo.gbk /luto:/companydb/foo.gdb


DBTOOLS維護精靈

使用VFP開發的版本,附原始碼. http://vfp.sunyear.com.tw/files/11_1063219595.jpg

工具下載

DBTOOLS維護精靈 GBAK BackupRunner