Please enable JavaScript to view this site.

R:BASE 11 Help

Navigation: Command Index > R

RESTORE (Short Name: RES)

Scroll Prev Top Next More

Use the RESTORE command to restore part or all of a database from a file created with BACKUP.

 

RESTORE

 

Option

 

filespec

Specifies a file name with a drive and path specification in the form D:\PATHNAME/FILENAME.EXT.

 

About the RESTORE Command

If you are restoring a backup copy from a floppy disk, insert the disk in the floppy drive. If there is more than one backup disk, insert the disk labeled 1 first. RESTORE prompts you for the appropriate disk and allows you to confirm each disk. If you backed up data and structure separately, you can choose not to restore any subsequent disks. RESTORE appends data to the table if it exists in the database.

 

If your database becomes damaged after your last backup and any of the .RBn files of the database remain, you can rename the database files, restore the database on a different directory, or erase them before you restore the database from the backup.

 

When STATICDB is set on, which activates a read-only schema mode, RESTORE is unavailable.

 

To use RESTORE, the RESTORE.RMD file must be in the directory containing the R:BASE program files. If you cannot locate the RESTORE.RMD file in your R:BASE program directory, then save the following as the file.

 

--RESTORE.RMD

CLEAR VARIABLES YesNo, OldQuote, Quote

SET VARIABLE Quote TEXT = QUOTES

SET VARIABLE OldQuote = (CVAL(.Quote))

SET QUOTES='

SET VARIABLE YesNo = 'Y'

WHILE YesNo <> 'E' THEN

  BEEP

  SET QUOTES='

  WRITE 'Please insert disk into drive...'

  DIALOG 'Press Enter to continue, or S to stop operation.' YesNo vEndKey 1

  IF YesNo = 'S' THEN

     SET QUOTES = .OldQuote

     PAUSE 1

     RETURN

  ENDIF

  INPUT .%1

ENDWHILE

PAUSE 1

RETURN

 

Examples

 

This command restores the concomp database from the CONCOMP.BUP file on drive A:.

 

RESTORE a:concomp.bup

 

The following command lines open the database and restore the TBLNAME.BUP file on drive A: that contains a backup of a table. R:BASE generated the TBLNAME.BUP file when you used the BACKUP DATA command.

 

CONNECT dbname

RESTORE a:table.bup