The following sections provide examples for backing up and restoring user database.
This section provides examples on using a tape drive and a .dat file as the backup and recovery resources.
In the commands in this section, the physical device name TAPE0 replaces the stripe_device variable.
To use the first tape device to back up and load a database:
1> dump database pubs2 to "\\.\TAPE0" 2> go
1> load database pubs2 from "\\.\TAPE0" 2> go
To back up and load the pubs2 database using a .dat file:
1> dump database pubs2 to "d:\backups\backup1.dat" 2> go 1> load database pubs2 from "d:\backups\backup1.dat" 2> go
To back up to and restore from the first tape drive on a remote NT Backup Server named REMOTE_BKP_SERVER:
1> dump database pubs2 to "\\.\TAPE0" at REMOTE_BKP_SERVER 2> go 1> load database pubs2 from "\\.\TAPE0" at REMOTE_BKP_SERVER 2> go
To back up a transaction log and create a default backup file name:
1> dump tran publications to "\\.\TAPE0" 2> go
To restore the log using the default file name in the file clause:
1> load tran publications from "\\.\TAPE0" 2> with file = "cations930590E100" 3> go
The dump command uses the last 7 characters in the database name publications to create the transaction log backup file 930590E100. See the System Administration Guide.
In the following example, as directed by the user, the 15-character file name, personnel97sep111800 records the following backup information:
The database name (personnel)
The date (97sep11) – September 11, 1997
The time (1800) – 18:00 or 6:00 p.m.
To back up the personnel database using the file clause to create the file name:
1> dump database personnel to "\\.\TAPE0" 2> with file = "personnel97sep111800" 3> go
To restore the personnel database by advancing the tape automatically to personnel97sep111800 before restoring:
1> load database personnel from "\\.\TAPE0" 2> with file = "personnel97sep111800" 3> go
The file names in the preceding examples are valid only for systems that use the NTFS file system. If you are using a FAT-based file system, file names are limited to 8 characters with a 3-character extension.
To back up the database to three devices using the stripe on parameter and three devices:
1> dump database personnel to "\\.\TAPE0" 2> stripe on "\\.\TAPE1" 3> stripe on "\\.\TAPE2" 4> go
To restore the database using the stripe on parameter and two devices:
1> load database personnel from "\\.\TAPE0" 2> stripe on "\\.\TAPE1" 3> go
To back up a database using three devices, each attached to the remote Backup Server, REMOTE_BKP_SERVER:
1> dump database personnel 2> to "\\.\TAPE0" at REMOTE_BKP_SERVER 3> stripe on "\\.\TAPE1" at REMOTE_BKP_SERVER 4> stripe on "\\.\TAPE2" at REMOTE_BKP_SERVER 5> go
To initialize two devices to overwrite the existing contents with the new transaction log backups:
1> dump transaction personnel to "\\.\TAPE0" 2> stripe on "\\.\TAPE1" with init 3> go
To return header information for the first file on the tape:
1> load database personnel from "\\.\TAPE0" 2> with headeronly 3> go
To return header information for the file personnel9229510945:
1> load database personnel from "\\.\TAPE0" 2> with headeronly, file = "personnel9229510945" 3> go