Database restore examples

From InterBase
Jump to: navigation, search

Go Up to Some backup and restore examples


The first example restores a database that resides in the /archive directory on the machine where gbak is running and restores it to jupiter, overwriting an existing (but inactive) database.

gbak -r -user joe -pass blurf@ C:\archive\foo.ibk jupiter:/foo.ib

The next example restores a multifile database from the /backup directory of jupiter to the /companydb directory of jupiter. This command runs on the server by invoking Service Manager, thus saving time and network traffic. In this example, the first two files of the restored database are 500 pages long and the last file grows as needed.

gbak -r user -joe -pass blurf@ -se jupiter:service_mgr /backup/foo1.ibk
 /backup/foo2.ibk /backup/fooLast.ibk /companydb/foo1.ib 500
 /companydb/foo2.ib 500 /companydb/fooLast.ib

The next example executes on server Jupiter using Service Manager and restores a backup that is on Jupiter to another server called Pluto.

gbak -r user -joe -pass blurf@ -se jupiter:service_mgr

 /backup/foo.ibk pluto:/companydb/foo.ib