Difference Between Restore Job and Copy Job

Database
Enthusiast

Difference Between Restore Job and Copy Job

Hi,

I am not sure if this is the right place to post my question.

Anyway, I am new to Teradata. I use NetVault to restore and backup the data onto tapes.

Now my question is: How can I be dead sure that when I have to make a Restore Job and when I have to make a Copy Job?

What is the difference between the 2?

A simple scenario would further explain the point I am trying to get across:

The client requested to restore the data from a previous date (A simple backup job for backing up the data for the current date was made).

Now I searched around and since the client mentioned "restore the data" I was pretty sure that it was going to be a fairly simple Restore Job.

A colleague of mine suggested that it was not the case, what I had to do was to delete all the tables of the destination database and copy the contents of the previous dated backup into the now empty container, thus creating a Copy Job.

This has me stumped, what am I to do?

Also let me add, that during the backup, a very small table was skipped due to being in the state of MLoad/FLoad.

Any suggestions and comments would be most appreciated.

Tags (2)
6 REPLIES
Teradata Employee

Re: Difference Between Restore Job and Copy Job

In my opinion its just a matter of understanding .... which that situation at hand may be the best thing was to copy and not restore. Technically they are 3 different things to achieve same purpose .... so better to ask this question to your colleague and get on same definition/understanding level.

Regards, Adeel

Enthusiast

Re: Difference Between Restore Job and Copy Job

Thanks Adeel for your comment and input.

Now can you tell me what is the difference between "Copy Job" and "Restore Job"?

In your experience, when would you make a copy job and when would you make a restore job?

Maybe I can learn from what you have done in the past.

Cheers!

Enthusiast

Re: Difference Between Restore Job and Copy Job

Below is the difference between the two:

Restore Job:

If the table you are to restore currently exists at the same location, (note that it has not been dropped and recreated since the time the backup was taken) you would make a restore job.

Copy Job:

You would make a Copy Job in one of the following situations:

  1. The table does not currently exist
  2. The table had been dropped and recreated since the time the backup was taken
  3. If you want to make a copy of the table in a different database, other than the one in which it exists

For point 2 in Copy Job, even though the table exists with the same name, the Restore Job will fail and Copy Job would have to be made. This is because, for Restore Job to work the table header ID of existing table and table to restore should be the same. If the table is recreated, the table header ID is different. 

Fan

Re: Difference Between Restore Job and Copy Job

Thnaks UsMans,

And what did you do for- 

Also let me add, that during the backup, a very small table was skipped due to being in the state of MLoad/FLoad.

Any suggestions and comments would be most appreciated.

This will help us to understand the process.

Enthusiast

Re: Difference Between Restore Job and Copy Job

Hi Amolph,

During the time of FastLoad or MultiLoad some tables having extensions (‘ET_’, ‘UV_’, ‘WT_’, ‘LT_’) are created in the database during loading operation and are automatically dropped upon successful completion. If at the same time, that database is being "backed up" then these tables are skipped from the backup.

I have observed that most of the time, after completion of MLoad or FLoad these tables are dropped automatically, after successfull completion of job and even if they are skipped, I have not noticed a great impact.

Teradata Employee

Re: Difference Between Restore Job and Copy Job

One diifrence is also that

A restore operation moves data from archived files back to the same Teradata Database from which it was archived or moves data to a different Teradata Database so long as database DBC is already restored.

A copy operation moves data from an archived file to any existing Teradata Database and creates a new object if one does not already exist on that target database. (The target object does not have to exist, however, the database must already exist.)