Please enable JavaScript to view this site.

R:BASE 11 Beginners Tutorial

If the original database files become damaged, you can restore the files using a backup file. R:BASE uses the backup file to restore the four database files to the same drive and directory of the backup file location. Make sure the current location of the backup file contains enough free space before attempting to restore the database. The backup file is executed using the R:BASE RUN command. The commands in the file are read and executed, and the database is rebuilt. The restore process will not overwrite existing database structure or data. It uses the LOAD command for data and appends that data to the end of the table. Remember, the backup file is just an ASCII file of R:BASE commands.

 

Before restoring an entire database, delete or rename the existing database files that have the same name. Otherwise, you will receive an error stating the database already exists. Before restoring forms, reports or labels, you must delete all rows from the appropriate system table. Otherwise, the result will be multiple forms, reports or labels with the same name. Before restoring a user table, delete all rows from the table, or copy the table, and delete rows from the original table. Otherwise, again you will have duplicate entries.

 

Before you restore the database, change the name of the damaged database files. The SkyWrite database really isn't damaged; we are only testing the backup.

 

To change the name of the damaged database:

 

First, the working directory needs to be changed from the network drive back to where the SkyWrite database is located.

 

1.From the R:BASE menu bar, select Database: Connection history:  (Your sample SkyWrite database).

 

The R:BASE working directory changes to the SkyWrite database folder.

 

2.In the Database Explorer, select "Databases" from the Group Bar.
3.Select "SkyWrite".
4.Choose "Disconnect Database" to disconnect from the database.

 

Now, rename the database.

 

5.Click the "Rename" option.

 

You are prompted to enter the new name for the database files.

 

6.Enter "SkyWriteBackup" as the new name.
7.Click the OK button.

 

R:BASE renames the SkyWrite database files to SkyWriteBackup.

 

The next step is to restore the database on the network drive location.

 

You can restore an unloaded database backup with the RUN command. Remember, the RUN command restores the four database files to the same drive and directory of the backup file location. You can either copy the backup files to another location, but right now they are still in the "F:\Backup" folder.

 

To restore a database:

 

1.At the R> Prompt, type "F:" and press [Enter].

 

The R:BASE working directory changes to the root F: drive.

 

2.At the R> Prompt, type "CHDIR Backup" and press [Enter].

 

The R:BASE working directory changes to the F:\Backup folder.

 

3.At the R> Prompt, check your location by typing "DIR" and press [Enter].

 

Right now, R:BASE should be at the "F:\Backup" folder. The R> Prompt output console will show the current location and the two backup files.

 

4.At the R> Prompt, type "RUN SkyWrite.ALL" and press [Enter].

 

The output console will show the creation and loading of tables.

 

5.When the process is complete, focus will return to the R> Prompt output console with the cursor blinking again.

 

Now, check folder for the database files.

 

6.At the R>, type "DIR" and press [Enter].

 

The R> Prompt output console will show the current location, the four database files, and the two backup files.

 

After you are sure that the backup files were successfully restored, you can delete the damaged database. It is always recommended that you verify the integrity of your backups by restoring the backups periodically and checking for errors.

 

7.Reconnect to the original database by selecting Database: Connection history:  (Your sample database) from the menu bar.